2017-02-07 21:05:30 +01:00
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:15:5
|
2018-01-16 15:52:16 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 1 << 2 + 3;
|
2018-01-16 15:52:16 +01:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (2 + 3)`
|
|
|
|
|
|
2018-08-01 16:30:44 +02:00
|
|
|
= note: `-D clippy::precedence` implied by `-D warnings`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:16:5
|
2018-01-16 15:52:16 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 1 + 2 << 3;
|
2018-01-16 15:52:16 +01:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 2) << 3`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:17:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 4 >> 1 + 1;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `4 >> (1 + 1)`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:18:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 1 + 3 >> 2;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 3) >> 2`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:19:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 1 ^ 1 - 1;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `1 ^ (1 - 1)`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:20:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 3 | 2 - 1;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `3 | (2 - 1)`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:21:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | 3 & 5 - 2;
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `3 & (5 - 2)`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: unary minus has lower precedence than method call
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:22:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | -1i32.abs();
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1i32.abs())`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
|
|
error: unary minus has lower precedence than method call
|
2019-01-07 22:33:18 +01:00
|
|
|
--> $DIR/precedence.rs:23:5
|
2017-02-07 21:05:30 +01:00
|
|
|
|
|
2018-12-27 16:57:55 +01:00
|
|
|
LL | -1f32.abs();
|
2017-07-21 10:40:23 +02:00
|
|
|
| ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1f32.abs())`
|
2017-02-07 21:05:30 +01:00
|
|
|
|
2018-01-16 17:06:27 +01:00
|
|
|
error: aborting due to 9 previous errors
|
|
|
|
|