2017-02-07 14:05:30 -06:00
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:28:5
|
2018-01-16 08:52:16 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
28 | 1 << 2 + 3;
|
2018-01-16 08:52:16 -06:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (2 + 3)`
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::precedence` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:29:5
|
2018-01-16 08:52:16 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
29 | 1 + 2 << 3;
|
2018-01-16 08:52:16 -06:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 2) << 3`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:30:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
30 | 4 >> 1 + 1;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `4 >> (1 + 1)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:31:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
31 | 1 + 3 >> 2;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 3) >> 2`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:32:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
32 | 1 ^ 1 - 1;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `1 ^ (1 - 1)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:33:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
33 | 3 | 2 - 1;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `3 | (2 - 1)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:34:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
34 | 3 & 5 - 2;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `3 & (5 - 2)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: unary minus has lower precedence than method call
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:35:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
35 | -1i32.abs();
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1i32.abs())`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: unary minus has lower precedence than method call
|
2018-10-06 11:18:06 -05:00
|
|
|
--> $DIR/precedence.rs:36:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2018-10-06 11:18:06 -05:00
|
|
|
36 | -1f32.abs();
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1f32.abs())`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
2018-01-16 10:06:27 -06:00
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|