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