]> git.lizzy.rs Git - rust.git/blob - clippy_tests/examples/precedence.stderr
324a42757eff55da343233fcbd2d774e79cf3d62
[rust.git] / clippy_tests / examples / precedence.stderr
1 error: operator precedence can trip the unwary
2  --> precedence.rs:8:5
3   |
4 8 |     1 << 2 + 3;
5   |     ^^^^^^^^^^ help: consider parenthesizing your expression `1 << (2 + 3)`
6   |
7   = note: `-D precedence` implied by `-D warnings`
8
9 error: operator precedence can trip the unwary
10  --> precedence.rs:9:5
11   |
12 9 |     1 + 2 << 3;
13   |     ^^^^^^^^^^ help: consider parenthesizing your expression `(1 + 2) << 3`
14   |
15   = note: `-D precedence` implied by `-D warnings`
16
17 error: operator precedence can trip the unwary
18   --> precedence.rs:10:5
19    |
20 10 |     4 >> 1 + 1;
21    |     ^^^^^^^^^^ help: consider parenthesizing your expression `4 >> (1 + 1)`
22    |
23    = note: `-D precedence` implied by `-D warnings`
24
25 error: operator precedence can trip the unwary
26   --> precedence.rs:11:5
27    |
28 11 |     1 + 3 >> 2;
29    |     ^^^^^^^^^^ help: consider parenthesizing your expression `(1 + 3) >> 2`
30    |
31    = note: `-D precedence` implied by `-D warnings`
32
33 error: operator precedence can trip the unwary
34   --> precedence.rs:12:5
35    |
36 12 |     1 ^ 1 - 1;
37    |     ^^^^^^^^^ help: consider parenthesizing your expression `1 ^ (1 - 1)`
38    |
39    = note: `-D precedence` implied by `-D warnings`
40
41 error: operator precedence can trip the unwary
42   --> precedence.rs:13:5
43    |
44 13 |     3 | 2 - 1;
45    |     ^^^^^^^^^ help: consider parenthesizing your expression `3 | (2 - 1)`
46    |
47    = note: `-D precedence` implied by `-D warnings`
48
49 error: operator precedence can trip the unwary
50   --> precedence.rs:14:5
51    |
52 14 |     3 & 5 - 2;
53    |     ^^^^^^^^^ help: consider parenthesizing your expression `3 & (5 - 2)`
54    |
55    = note: `-D precedence` implied by `-D warnings`
56
57 error: unary minus has lower precedence than method call
58   --> precedence.rs:15:5
59    |
60 15 |     -1i32.abs();
61    |     ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent `-(1i32.abs())`
62    |
63    = note: `-D precedence` implied by `-D warnings`
64
65 error: unary minus has lower precedence than method call
66   --> precedence.rs:16:5
67    |
68 16 |     -1f32.abs();
69    |     ^^^^^^^^^^^ help: consider adding parentheses to clarify your intent `-(1f32.abs())`
70    |
71    = note: `-D precedence` implied by `-D warnings`
72
73 error: aborting due to previous error(s)
74
75 error: Could not compile `clippy_tests`.
76
77 To learn more, run the command again with --verbose.