2017-02-07 14:05:30 -06:00
|
|
|
error: operator precedence can trip the unwary
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:8:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
|
8 | 1 << 2 + 3;
|
2017-07-21 03:40:23 -05:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (2 + 3)`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
= note: `-D precedence` implied by `-D warnings`
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:9:5
|
2017-05-11 09:32:42 -05:00
|
|
|
|
|
|
|
|
9 | 1 + 2 << 3;
|
2017-07-21 03:40:23 -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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:10:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
10 | 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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:11:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
11 | 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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:12:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
12 | 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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:13:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
13 | 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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:14:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
14 | 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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:15:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
15 | -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
|
2017-08-01 10:54:21 -05:00
|
|
|
--> $DIR/precedence.rs:16:5
|
2017-02-07 14:05:30 -06:00
|
|
|
|
|
2017-05-11 09:32:42 -05:00
|
|
|
16 | -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
|
|
|
|