]> git.lizzy.rs Git - rust.git/blob - tests/ui/bit_masks.stderr
iterate List by value
[rust.git] / tests / ui / bit_masks.stderr
1 error: &-masking with zero
2   --> $DIR/bit_masks.rs:14:5
3    |
4 LL |     x & 0 == 0;
5    |     ^^^^^^^^^^
6    |
7    = note: `-D clippy::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:14:5
11    |
12 LL |     x & 0 == 0;
13    |     ^^^^^
14    |
15    = note: `#[deny(clippy::erasing_op)]` on by default
16
17 error: incompatible bit mask: `_ & 2` can never be equal to `1`
18   --> $DIR/bit_masks.rs:17:5
19    |
20 LL |     x & 2 == 1;
21    |     ^^^^^^^^^^
22
23 error: incompatible bit mask: `_ | 3` can never be equal to `2`
24   --> $DIR/bit_masks.rs:21:5
25    |
26 LL |     x | 3 == 2;
27    |     ^^^^^^^^^^
28
29 error: incompatible bit mask: `_ & 1` will never be higher than `1`
30   --> $DIR/bit_masks.rs:23:5
31    |
32 LL |     x & 1 > 1;
33    |     ^^^^^^^^^
34
35 error: incompatible bit mask: `_ | 2` will always be higher than `1`
36   --> $DIR/bit_masks.rs:27:5
37    |
38 LL |     x | 2 > 1;
39    |     ^^^^^^^^^
40
41 error: incompatible bit mask: `_ & 7` can never be equal to `8`
42   --> $DIR/bit_masks.rs:34:5
43    |
44 LL |     x & THREE_BITS == 8;
45    |     ^^^^^^^^^^^^^^^^^^^
46
47 error: incompatible bit mask: `_ | 7` will never be lower than `7`
48   --> $DIR/bit_masks.rs:35:5
49    |
50 LL |     x | EVEN_MORE_REDIRECTION < 7;
51    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
53 error: &-masking with zero
54   --> $DIR/bit_masks.rs:37:5
55    |
56 LL |     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:37:5
61    |
62 LL |     0 & x == 0;
63    |     ^^^^^
64
65 error: incompatible bit mask: `_ | 2` will always be higher than `1`
66   --> $DIR/bit_masks.rs:41:5
67    |
68 LL |     1 < 2 | x;
69    |     ^^^^^^^^^
70
71 error: incompatible bit mask: `_ | 3` can never be equal to `2`
72   --> $DIR/bit_masks.rs:42:5
73    |
74 LL |     2 == 3 | x;
75    |     ^^^^^^^^^^
76
77 error: incompatible bit mask: `_ & 2` can never be equal to `1`
78   --> $DIR/bit_masks.rs:43:5
79    |
80 LL |     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:54:5
85    |
86 LL |     x | 1 > 3;
87    |     ^^^^^^^^^
88    |
89    = note: `-D clippy::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:55:5
93    |
94 LL |     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:56:5
99    |
100 LL |     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:57:5
105    |
106 LL |     x | 1 >= 8;
107    |     ^^^^^^^^^^
108
109 error: aborting due to 17 previous errors
110