2017-02-07 20:05:30 +00:00
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:16:5
|
2018-01-16 14:52:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 1 << 2 + 3;
|
2018-01-16 14:52:16 +00:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (2 + 3)`
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::precedence` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::precedence)]`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:17:5
|
2018-01-16 14:52:16 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 1 + 2 << 3;
|
2018-01-16 14:52:16 +00:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 2) << 3`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:18:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 4 >> 1 + 1;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `4 >> (1 + 1)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:19:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 1 + 3 >> 2;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 3) >> 2`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:20:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 1 ^ 1 - 1;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `1 ^ (1 - 1)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:21:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 3 | 2 - 1;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `3 | (2 - 1)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: operator precedence can trip the unwary
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/precedence.rs:22:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 3 & 5 - 2;
|
2017-07-21 08:40:23 +00:00
|
|
|
| ^^^^^^^^^ help: consider parenthesizing your expression: `3 & (5 - 2)`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2024-02-20 21:19:26 +00:00
|
|
|
error: aborting due to 7 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|