Clarify message for erasing_op lint
This commit is contained in:
parent
a5d2bfebc4
commit
7b16f4d7ff
3 changed files with 8 additions and 7 deletions
|
|
@ -6,7 +6,7 @@ error: &-masking with zero
|
|||
|
|
||||
= note: `-D bad-bit-mask` implied by `-D warnings`
|
||||
|
||||
error: the operation is ineffective. Consider reducing it to `0`
|
||||
error: this operation will always return zero. This is likely not the intended outcome
|
||||
--> $DIR/bit_masks.rs:12:5
|
||||
|
|
||||
12 | x & 0 == 0;
|
||||
|
|
@ -56,7 +56,7 @@ error: &-masking with zero
|
|||
35 | 0 & x == 0;
|
||||
| ^^^^^^^^^^
|
||||
|
||||
error: the operation is ineffective. Consider reducing it to `0`
|
||||
error: this operation will always return zero. This is likely not the intended outcome
|
||||
--> $DIR/bit_masks.rs:35:5
|
||||
|
|
||||
35 | 0 & x == 0;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: the operation is ineffective. Consider reducing it to `0`
|
||||
error: this operation will always return zero. This is likely not the intended outcome
|
||||
--> $DIR/erasing_op.rs:9:5
|
||||
|
|
||||
9 | x * 0;
|
||||
|
|
@ -6,13 +6,13 @@ error: the operation is ineffective. Consider reducing it to `0`
|
|||
|
|
||||
= note: `-D erasing-op` implied by `-D warnings`
|
||||
|
||||
error: the operation is ineffective. Consider reducing it to `0`
|
||||
error: this operation will always return zero. This is likely not the intended outcome
|
||||
--> $DIR/erasing_op.rs:10:5
|
||||
|
|
||||
10 | 0 & x;
|
||||
| ^^^^^
|
||||
|
||||
error: the operation is ineffective. Consider reducing it to `0`
|
||||
error: this operation will always return zero. This is likely not the intended outcome
|
||||
--> $DIR/erasing_op.rs:11:5
|
||||
|
|
||||
11 | 0 / x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue