2017-02-07 14:05:30 -06:00
|
|
|
error: operator precedence can trip the unwary
|
|
|
|
--> $DIR/precedence.rs:8:5
|
|
|
|
|
|
|
|
|
8 | 1 << 2 + 3;
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression `1 << (2 + 3)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
note: lint level defined here
|
|
|
|
--> $DIR/precedence.rs:4:8
|
|
|
|
|
|
|
|
|
4 | #[deny(precedence)]
|
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
|
|
|
--> $DIR/precedence.rs:11:5
|
|
|
|
|
|
|
|
|
11 | 1 + 2 << 3;
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression `(1 + 2) << 3`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
|
|
|
--> $DIR/precedence.rs:14:5
|
|
|
|
|
|
|
|
|
14 | 4 >> 1 + 1;
|
2017-05-03 05:51:47 -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
|
|
|
|
--> $DIR/precedence.rs:17:5
|
|
|
|
|
|
|
|
|
17 | 1 + 3 >> 2;
|
2017-05-03 05:51:47 -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
|
|
|
|
--> $DIR/precedence.rs:20:5
|
|
|
|
|
|
|
|
|
20 | 1 ^ 1 - 1;
|
2017-05-03 05:51:47 -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
|
|
|
|
--> $DIR/precedence.rs:23:5
|
|
|
|
|
|
|
|
|
23 | 3 | 2 - 1;
|
2017-05-03 05:51:47 -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
|
|
|
|
--> $DIR/precedence.rs:26:5
|
|
|
|
|
|
|
|
|
26 | 3 & 5 - 2;
|
2017-05-03 05:51:47 -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
|
|
|
|
--> $DIR/precedence.rs:30:5
|
|
|
|
|
|
|
|
|
30 | -1i32.abs();
|
2017-05-03 05:51:47 -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
|
|
|
|
--> $DIR/precedence.rs:33:5
|
|
|
|
|
|
|
|
|
33 | -1f32.abs();
|
2017-05-03 05:51:47 -05:00
|
|
|
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent `-(1f32.abs())`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|