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