rust/tests/ui/bit_masks.stderr

113 lines
2.9 KiB
Plaintext
Raw Normal View History

error: &-masking with zero
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:14:5
|
2018-12-27 09:57:55 -06:00
LL | x & 0 == 0;
| ^^^^^^^^^^
|
= note: `-D clippy::bad-bit-mask` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::bad_bit_mask)]`
2017-10-15 02:32:47 -05:00
error: this operation will always return zero. This is likely not the intended outcome
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:14:5
|
2018-12-27 09:57:55 -06:00
LL | x & 0 == 0;
| ^^^^^
|
= note: `#[deny(clippy::erasing_op)]` on by default
error: incompatible bit mask: `_ & 2` can never be equal to `1`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:21:5
|
2018-12-27 09:57:55 -06:00
LL | x & 2 == 1;
| ^^^^^^^^^^
error: incompatible bit mask: `_ | 3` can never be equal to `2`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:26:5
|
2018-12-27 09:57:55 -06:00
LL | x | 3 == 2;
| ^^^^^^^^^^
error: incompatible bit mask: `_ & 1` will never be higher than `1`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:29:5
|
2018-12-27 09:57:55 -06:00
LL | x & 1 > 1;
| ^^^^^^^^^
error: incompatible bit mask: `_ | 2` will always be higher than `1`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:34:5
|
2018-12-27 09:57:55 -06:00
LL | x | 2 > 1;
| ^^^^^^^^^
error: incompatible bit mask: `_ & 7` can never be equal to `8`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:42:5
|
2018-12-27 09:57:55 -06:00
LL | x & THREE_BITS == 8;
| ^^^^^^^^^^^^^^^^^^^
error: incompatible bit mask: `_ | 7` will never be lower than `7`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:44:5
|
2018-12-27 09:57:55 -06:00
LL | x | EVEN_MORE_REDIRECTION < 7;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: &-masking with zero
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:47:5
|
2018-12-27 09:57:55 -06:00
LL | 0 & x == 0;
| ^^^^^^^^^^
2017-10-15 02:32:47 -05:00
error: this operation will always return zero. This is likely not the intended outcome
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:47:5
|
2018-12-27 09:57:55 -06:00
LL | 0 & x == 0;
| ^^^^^
error: incompatible bit mask: `_ | 2` will always be higher than `1`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:53:5
|
2018-12-27 09:57:55 -06:00
LL | 1 < 2 | x;
| ^^^^^^^^^
error: incompatible bit mask: `_ | 3` can never be equal to `2`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:55:5
|
2018-12-27 09:57:55 -06:00
LL | 2 == 3 | x;
| ^^^^^^^^^^
error: incompatible bit mask: `_ & 2` can never be equal to `1`
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:57:5
|
2018-12-27 09:57:55 -06:00
LL | 1 == x & 2;
| ^^^^^^^^^^
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:69:5
|
2018-12-27 09:57:55 -06:00
LL | x | 1 > 3;
| ^^^^^^^^^
|
= note: `-D clippy::ineffective-bit-mask` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ineffective_bit_mask)]`
error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:72:5
|
2018-12-27 09:57:55 -06:00
LL | x | 1 < 4;
| ^^^^^^^^^
error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:74:5
|
2018-12-27 09:57:55 -06:00
LL | x | 1 <= 3;
| ^^^^^^^^^^
error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly
2024-02-17 06:16:29 -06:00
--> tests/ui/bit_masks.rs:76:5
|
2018-12-27 09:57:55 -06:00
LL | x | 1 >= 8;
| ^^^^^^^^^^
2018-01-16 10:06:27 -06:00
error: aborting due to 17 previous errors