]> git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/bit_masks.stderr
New upstream version 1.23.0+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / bit_masks.stderr
1 error: &-masking with zero
2 --> $DIR/bit_masks.rs:12:5
3 |
4 12 | x & 0 == 0;
5 | ^^^^^^^^^^
6 |
7 = note: `-D bad-bit-mask` implied by `-D warnings`
8
9 error: this operation will always return zero. This is likely not the intended outcome
10 --> $DIR/bit_masks.rs:12:5
11 |
12 12 | x & 0 == 0;
13 | ^^^^^
14 |
15 = note: `-D erasing-op` implied by `-D warnings`
16
17 error: incompatible bit mask: `_ & 2` can never be equal to `1`
18 --> $DIR/bit_masks.rs:15:5
19 |
20 15 | x & 2 == 1;
21 | ^^^^^^^^^^
22
23 error: incompatible bit mask: `_ | 3` can never be equal to `2`
24 --> $DIR/bit_masks.rs:19:5
25 |
26 19 | x | 3 == 2;
27 | ^^^^^^^^^^
28
29 error: incompatible bit mask: `_ & 1` will never be higher than `1`
30 --> $DIR/bit_masks.rs:21:5
31 |
32 21 | x & 1 > 1;
33 | ^^^^^^^^^
34
35 error: incompatible bit mask: `_ | 2` will always be higher than `1`
36 --> $DIR/bit_masks.rs:25:5
37 |
38 25 | x | 2 > 1;
39 | ^^^^^^^^^
40
41 error: incompatible bit mask: `_ & 7` can never be equal to `8`
42 --> $DIR/bit_masks.rs:32:5
43 |
44 32 | x & THREE_BITS == 8;
45 | ^^^^^^^^^^^^^^^^^^^
46
47 error: incompatible bit mask: `_ | 7` will never be lower than `7`
48 --> $DIR/bit_masks.rs:33:5
49 |
50 33 | x | EVEN_MORE_REDIRECTION < 7;
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
53 error: &-masking with zero
54 --> $DIR/bit_masks.rs:35:5
55 |
56 35 | 0 & x == 0;
57 | ^^^^^^^^^^
58
59 error: this operation will always return zero. This is likely not the intended outcome
60 --> $DIR/bit_masks.rs:35:5
61 |
62 35 | 0 & x == 0;
63 | ^^^^^
64
65 error: incompatible bit mask: `_ | 2` will always be higher than `1`
66 --> $DIR/bit_masks.rs:39:5
67 |
68 39 | 1 < 2 | x;
69 | ^^^^^^^^^
70
71 error: incompatible bit mask: `_ | 3` can never be equal to `2`
72 --> $DIR/bit_masks.rs:40:5
73 |
74 40 | 2 == 3 | x;
75 | ^^^^^^^^^^
76
77 error: incompatible bit mask: `_ & 2` can never be equal to `1`
78 --> $DIR/bit_masks.rs:41:5
79 |
80 41 | 1 == x & 2;
81 | ^^^^^^^^^^
82
83 error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
84 --> $DIR/bit_masks.rs:52:5
85 |
86 52 | x | 1 > 3;
87 | ^^^^^^^^^
88 |
89 = note: `-D ineffective-bit-mask` implied by `-D warnings`
90
91 error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
92 --> $DIR/bit_masks.rs:53:5
93 |
94 53 | x | 1 < 4;
95 | ^^^^^^^^^
96
97 error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
98 --> $DIR/bit_masks.rs:54:5
99 |
100 54 | x | 1 <= 3;
101 | ^^^^^^^^^^
102
103 error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
104 --> $DIR/bit_masks.rs:55:5
105 |
106 55 | x | 1 >= 8;
107 | ^^^^^^^^^^
108