]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/bit_masks.stderr
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / clippy / tests / ui / bit_masks.stderr
CommitLineData
f20569fa
XL
1error: &-masking with zero
2 --> $DIR/bit_masks.rs:14:5
3 |
4LL | x & 0 == 0;
5 | ^^^^^^^^^^
6 |
7 = note: `-D clippy::bad-bit-mask` implied by `-D warnings`
8
9error: this operation will always return zero. This is likely not the intended outcome
10 --> $DIR/bit_masks.rs:14:5
11 |
12LL | x & 0 == 0;
13 | ^^^^^
14 |
15 = note: `#[deny(clippy::erasing_op)]` on by default
16
17error: incompatible bit mask: `_ & 2` can never be equal to `1`
18 --> $DIR/bit_masks.rs:17:5
19 |
20LL | x & 2 == 1;
21 | ^^^^^^^^^^
22
23error: incompatible bit mask: `_ | 3` can never be equal to `2`
24 --> $DIR/bit_masks.rs:21:5
25 |
26LL | x | 3 == 2;
27 | ^^^^^^^^^^
28
29error: incompatible bit mask: `_ & 1` will never be higher than `1`
30 --> $DIR/bit_masks.rs:23:5
31 |
32LL | x & 1 > 1;
33 | ^^^^^^^^^
34
35error: incompatible bit mask: `_ | 2` will always be higher than `1`
36 --> $DIR/bit_masks.rs:27:5
37 |
38LL | x | 2 > 1;
39 | ^^^^^^^^^
40
41error: incompatible bit mask: `_ & 7` can never be equal to `8`
42 --> $DIR/bit_masks.rs:34:5
43 |
44LL | x & THREE_BITS == 8;
45 | ^^^^^^^^^^^^^^^^^^^
46
47error: incompatible bit mask: `_ | 7` will never be lower than `7`
48 --> $DIR/bit_masks.rs:35:5
49 |
50LL | x | EVEN_MORE_REDIRECTION < 7;
51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
53error: &-masking with zero
54 --> $DIR/bit_masks.rs:37:5
55 |
56LL | 0 & x == 0;
57 | ^^^^^^^^^^
58
59error: this operation will always return zero. This is likely not the intended outcome
60 --> $DIR/bit_masks.rs:37:5
61 |
62LL | 0 & x == 0;
63 | ^^^^^
64
65error: incompatible bit mask: `_ | 2` will always be higher than `1`
66 --> $DIR/bit_masks.rs:41:5
67 |
68LL | 1 < 2 | x;
69 | ^^^^^^^^^
70
71error: incompatible bit mask: `_ | 3` can never be equal to `2`
72 --> $DIR/bit_masks.rs:42:5
73 |
74LL | 2 == 3 | x;
75 | ^^^^^^^^^^
76
77error: incompatible bit mask: `_ & 2` can never be equal to `1`
78 --> $DIR/bit_masks.rs:43:5
79 |
80LL | 1 == x & 2;
81 | ^^^^^^^^^^
82
83error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
84 --> $DIR/bit_masks.rs:54:5
85 |
86LL | x | 1 > 3;
87 | ^^^^^^^^^
88 |
89 = note: `-D clippy::ineffective-bit-mask` implied by `-D warnings`
90
91error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
92 --> $DIR/bit_masks.rs:55:5
93 |
94LL | x | 1 < 4;
95 | ^^^^^^^^^
96
97error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
98 --> $DIR/bit_masks.rs:56:5
99 |
100LL | x | 1 <= 3;
101 | ^^^^^^^^^^
102
103error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
104 --> $DIR/bit_masks.rs:57:5
105 |
106LL | x | 1 >= 8;
107 | ^^^^^^^^^^
108
109error: aborting due to 17 previous errors
110