Clarify message for erasing_op lint

This commit is contained in:
Yury Krivopalov 2017-10-15 10:32:47 +03:00
parent a5d2bfebc4
commit 7b16f4d7ff
3 changed files with 8 additions and 7 deletions

View file

@ -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;

View file

@ -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;