]> git.lizzy.rs Git - rust.git/blob - tests/ui/precedence.stderr
Merge pull request #3291 from JoshMcguigan/cmp_owned-3289
[rust.git] / tests / ui / precedence.stderr
1 error: operator precedence can trip the unwary
2   --> $DIR/precedence.rs:28:5
3    |
4 28 |     1 << 2 + 3;
5    |     ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (2 + 3)`
6    |
7    = note: `-D clippy::precedence` implied by `-D warnings`
8
9 error: operator precedence can trip the unwary
10   --> $DIR/precedence.rs:29:5
11    |
12 29 |     1 + 2 << 3;
13    |     ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 2) << 3`
14
15 error: operator precedence can trip the unwary
16   --> $DIR/precedence.rs:30:5
17    |
18 30 |     4 >> 1 + 1;
19    |     ^^^^^^^^^^ help: consider parenthesizing your expression: `4 >> (1 + 1)`
20
21 error: operator precedence can trip the unwary
22   --> $DIR/precedence.rs:31:5
23    |
24 31 |     1 + 3 >> 2;
25    |     ^^^^^^^^^^ help: consider parenthesizing your expression: `(1 + 3) >> 2`
26
27 error: operator precedence can trip the unwary
28   --> $DIR/precedence.rs:32:5
29    |
30 32 |     1 ^ 1 - 1;
31    |     ^^^^^^^^^ help: consider parenthesizing your expression: `1 ^ (1 - 1)`
32
33 error: operator precedence can trip the unwary
34   --> $DIR/precedence.rs:33:5
35    |
36 33 |     3 | 2 - 1;
37    |     ^^^^^^^^^ help: consider parenthesizing your expression: `3 | (2 - 1)`
38
39 error: operator precedence can trip the unwary
40   --> $DIR/precedence.rs:34:5
41    |
42 34 |     3 & 5 - 2;
43    |     ^^^^^^^^^ help: consider parenthesizing your expression: `3 & (5 - 2)`
44
45 error: unary minus has lower precedence than method call
46   --> $DIR/precedence.rs:35:5
47    |
48 35 |     -1i32.abs();
49    |     ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1i32.abs())`
50
51 error: unary minus has lower precedence than method call
52   --> $DIR/precedence.rs:36:5
53    |
54 36 |     -1f32.abs();
55    |     ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent: `-(1f32.abs())`
56
57 error: aborting due to 9 previous errors
58