2017-02-07 20:05:30 +00:00
|
|
|
error: &-masking with zero
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:22:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
22 | x & 0 == 0;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::bad-bit-mask` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
2017-10-15 07:32:47 +00:00
|
|
|
error: this operation will always return zero. This is likely not the intended outcome
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:22:5
|
2017-09-30 17:14:00 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
22 | x & 0 == 0;
|
2017-09-30 17:14:00 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: #[deny(clippy::erasing_op)] on by default
|
2017-09-30 17:14:00 +00:00
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
error: incompatible bit mask: `_ & 2` can never be equal to `1`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:25:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
25 | x & 2 == 1;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ | 3` can never be equal to `2`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:29:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
29 | x | 3 == 2;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ & 1` will never be higher than `1`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:31:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
31 | x & 1 > 1;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ | 2` will always be higher than `1`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:35:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
35 | x | 2 > 1;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ & 7` can never be equal to `8`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:42:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
42 | x & THREE_BITS == 8;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ | 7` will never be lower than `7`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:43:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
43 | x | EVEN_MORE_REDIRECTION < 7;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: &-masking with zero
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:45:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
45 | 0 & x == 0;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2017-10-15 07:32:47 +00:00
|
|
|
error: this operation will always return zero. This is likely not the intended outcome
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:45:5
|
2017-09-30 17:14:00 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
45 | 0 & x == 0;
|
2017-09-30 17:14:00 +00:00
|
|
|
| ^^^^^
|
|
|
|
|
2017-02-07 20:05:30 +00:00
|
|
|
error: incompatible bit mask: `_ | 2` will always be higher than `1`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:49:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
49 | 1 < 2 | x;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ | 3` can never be equal to `2`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:50:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
50 | 2 == 3 | x;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: incompatible bit mask: `_ & 2` can never be equal to `1`
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:51:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
51 | 1 == x & 2;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:62:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
62 | x | 1 > 3;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
2018-08-01 14:30:44 +00:00
|
|
|
= note: `-D clippy::ineffective-bit-mask` implied by `-D warnings`
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:63:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
63 | x | 1 < 4;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:64:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
64 | x | 1 <= 3;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
|
2018-10-06 16:18:06 +00:00
|
|
|
--> $DIR/bit_masks.rs:65:5
|
2017-02-07 20:05:30 +00:00
|
|
|
|
|
2018-10-06 16:18:06 +00:00
|
|
|
65 | x | 1 >= 8;
|
2017-02-07 20:05:30 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
2018-01-16 16:06:27 +00:00
|
|
|
error: aborting due to 17 previous errors
|
|
|
|
|