mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-21 02:23:19 +00:00
125 lines
3.2 KiB
Text
125 lines
3.2 KiB
Text
error: &-masking with zero
|
|
--> examples/bit_masks.rs:12:5
|
|
|
|
|
12 | x & 0 == 0;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ & 2` can never be equal to `1`
|
|
--> examples/bit_masks.rs:15:5
|
|
|
|
|
15 | x & 2 == 1;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ | 3` can never be equal to `2`
|
|
--> examples/bit_masks.rs:19:5
|
|
|
|
|
19 | x | 3 == 2;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ & 1` will never be higher than `1`
|
|
--> examples/bit_masks.rs:21:5
|
|
|
|
|
21 | x & 1 > 1;
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ | 2` will always be higher than `1`
|
|
--> examples/bit_masks.rs:25:5
|
|
|
|
|
25 | x | 2 > 1;
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ & 7` can never be equal to `8`
|
|
--> examples/bit_masks.rs:32:5
|
|
|
|
|
32 | x & THREE_BITS == 8;
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ | 7` will never be lower than `7`
|
|
--> examples/bit_masks.rs:33:5
|
|
|
|
|
33 | x | EVEN_MORE_REDIRECTION < 7;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: &-masking with zero
|
|
--> examples/bit_masks.rs:35:5
|
|
|
|
|
35 | 0 & x == 0;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ | 2` will always be higher than `1`
|
|
--> examples/bit_masks.rs:39:5
|
|
|
|
|
39 | 1 < 2 | x;
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ | 3` can never be equal to `2`
|
|
--> examples/bit_masks.rs:40:5
|
|
|
|
|
40 | 2 == 3 | x;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: incompatible bit mask: `_ & 2` can never be equal to `1`
|
|
--> examples/bit_masks.rs:41:5
|
|
|
|
|
41 | 1 == x & 2;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D bad-bit-mask` implied by `-D warnings`
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
|
|
--> examples/bit_masks.rs:52:5
|
|
|
|
|
52 | x | 1 > 3;
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
|
|
--> examples/bit_masks.rs:53:5
|
|
|
|
|
53 | x | 1 < 4;
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
|
|
--> examples/bit_masks.rs:54:5
|
|
|
|
|
54 | x | 1 <= 3;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
|
|
--> examples/bit_masks.rs:55:5
|
|
|
|
|
55 | x | 1 >= 8;
|
|
| ^^^^^^^^^^
|
|
|
|
|
= note: `-D ineffective-bit-mask` implied by `-D warnings`
|
|
|
|
error: aborting due to 15 previous errors
|
|
|
|
error: Could not compile `clippy_tests`.
|
|
|
|
To learn more, run the command again with --verbose.
|