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