1 error: &-masking with zero
2 --> $DIR/bit_masks.rs:12:5
7 = note: `-D bad-bit-mask` implied by `-D warnings`
9 error: bit mask could be simplified with a call to `trailing_zeros`
10 --> $DIR/bit_masks.rs:12:5
13 | ^^^^^^^^^^ help: try: `x.trailing_zeros() > 0`
15 = note: `-D verbose-bit-mask` implied by `-D warnings`
17 error: bit mask could be simplified with a call to `trailing_zeros`
18 --> $DIR/bit_masks.rs:14:5
20 14 | x & 1 == 0; //ok, compared with zero
21 | ^^^^^^^^^^ help: try: `x.trailing_zeros() > 1`
23 error: incompatible bit mask: `_ & 2` can never be equal to `1`
24 --> $DIR/bit_masks.rs:15:5
29 error: incompatible bit mask: `_ | 3` can never be equal to `2`
30 --> $DIR/bit_masks.rs:19:5
35 error: incompatible bit mask: `_ & 1` will never be higher than `1`
36 --> $DIR/bit_masks.rs:21:5
41 error: incompatible bit mask: `_ | 2` will always be higher than `1`
42 --> $DIR/bit_masks.rs:25:5
47 error: incompatible bit mask: `_ & 7` can never be equal to `8`
48 --> $DIR/bit_masks.rs:32:5
50 32 | x & THREE_BITS == 8;
53 error: incompatible bit mask: `_ | 7` will never be lower than `7`
54 --> $DIR/bit_masks.rs:33:5
56 33 | x | EVEN_MORE_REDIRECTION < 7;
57 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 error: &-masking with zero
60 --> $DIR/bit_masks.rs:35:5
65 error: incompatible bit mask: `_ | 2` will always be higher than `1`
66 --> $DIR/bit_masks.rs:39:5
71 error: incompatible bit mask: `_ | 3` can never be equal to `2`
72 --> $DIR/bit_masks.rs:40:5
77 error: incompatible bit mask: `_ & 2` can never be equal to `1`
78 --> $DIR/bit_masks.rs:41:5
83 error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
84 --> $DIR/bit_masks.rs:52:5
89 = note: `-D ineffective-bit-mask` implied by `-D warnings`
91 error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
92 --> $DIR/bit_masks.rs:53:5
97 error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
98 --> $DIR/bit_masks.rs:54:5
103 error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
104 --> $DIR/bit_masks.rs:55:5
109 error: aborting due to 17 previous errors