diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/tools/clippy/tests/ui/bit_masks.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/bit_masks.stderr')
-rw-r--r-- | src/tools/clippy/tests/ui/bit_masks.stderr | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/bit_masks.stderr b/src/tools/clippy/tests/ui/bit_masks.stderr new file mode 100644 index 000000000..dc5ad6dfb --- /dev/null +++ b/src/tools/clippy/tests/ui/bit_masks.stderr @@ -0,0 +1,110 @@ +error: &-masking with zero + --> $DIR/bit_masks.rs:14:5 + | +LL | x & 0 == 0; + | ^^^^^^^^^^ + | + = note: `-D clippy::bad-bit-mask` implied by `-D warnings` + +error: this operation will always return zero. This is likely not the intended outcome + --> $DIR/bit_masks.rs:14:5 + | +LL | x & 0 == 0; + | ^^^^^ + | + = note: `#[deny(clippy::erasing_op)]` on by default + +error: incompatible bit mask: `_ & 2` can never be equal to `1` + --> $DIR/bit_masks.rs:17:5 + | +LL | x & 2 == 1; + | ^^^^^^^^^^ + +error: incompatible bit mask: `_ | 3` can never be equal to `2` + --> $DIR/bit_masks.rs:21:5 + | +LL | x | 3 == 2; + | ^^^^^^^^^^ + +error: incompatible bit mask: `_ & 1` will never be higher than `1` + --> $DIR/bit_masks.rs:23:5 + | +LL | x & 1 > 1; + | ^^^^^^^^^ + +error: incompatible bit mask: `_ | 2` will always be higher than `1` + --> $DIR/bit_masks.rs:27:5 + | +LL | x | 2 > 1; + | ^^^^^^^^^ + +error: incompatible bit mask: `_ & 7` can never be equal to `8` + --> $DIR/bit_masks.rs:34:5 + | +LL | x & THREE_BITS == 8; + | ^^^^^^^^^^^^^^^^^^^ + +error: incompatible bit mask: `_ | 7` will never be lower than `7` + --> $DIR/bit_masks.rs:35:5 + | +LL | x | EVEN_MORE_REDIRECTION < 7; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: &-masking with zero + --> $DIR/bit_masks.rs:37:5 + | +LL | 0 & x == 0; + | ^^^^^^^^^^ + +error: this operation will always return zero. This is likely not the intended outcome + --> $DIR/bit_masks.rs:37:5 + | +LL | 0 & x == 0; + | ^^^^^ + +error: incompatible bit mask: `_ | 2` will always be higher than `1` + --> $DIR/bit_masks.rs:41:5 + | +LL | 1 < 2 | x; + | ^^^^^^^^^ + +error: incompatible bit mask: `_ | 3` can never be equal to `2` + --> $DIR/bit_masks.rs:42:5 + | +LL | 2 == 3 | x; + | ^^^^^^^^^^ + +error: incompatible bit mask: `_ & 2` can never be equal to `1` + --> $DIR/bit_masks.rs:43:5 + | +LL | 1 == x & 2; + | ^^^^^^^^^^ + +error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly + --> $DIR/bit_masks.rs:54:5 + | +LL | x | 1 > 3; + | ^^^^^^^^^ + | + = note: `-D clippy::ineffective-bit-mask` implied by `-D warnings` + +error: ineffective bit mask: `x | 1` compared to `4`, is the same as x compared directly + --> $DIR/bit_masks.rs:55:5 + | +LL | x | 1 < 4; + | ^^^^^^^^^ + +error: ineffective bit mask: `x | 1` compared to `3`, is the same as x compared directly + --> $DIR/bit_masks.rs:56:5 + | +LL | x | 1 <= 3; + | ^^^^^^^^^^ + +error: ineffective bit mask: `x | 1` compared to `8`, is the same as x compared directly + --> $DIR/bit_masks.rs:57:5 + | +LL | x | 1 >= 8; + | ^^^^^^^^^^ + +error: aborting due to 17 previous errors + |