forked from rust-lang/rust
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#8204 - wigy-opensource-developer:fix-7210, r=…
…xFrednet [`erasing_op`] lint ignored when operation `Output` type is different from the type of constant `0` fixes rust-lang#7210 changelog: [`erasing_op`] lint ignored when operation `Output` type is different from the type of constant `0`
- Loading branch information
Showing
5 changed files
with
95 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
error: this operation will always return zero. This is likely not the intended outcome | ||
--> $DIR/erasing_op.rs:6:5 | ||
--> $DIR/erasing_op.rs:37:5 | ||
| | ||
LL | x * 0; | ||
| ^^^^^ | ||
| | ||
= note: `-D clippy::erasing-op` implied by `-D warnings` | ||
|
||
error: this operation will always return zero. This is likely not the intended outcome | ||
--> $DIR/erasing_op.rs:7:5 | ||
--> $DIR/erasing_op.rs:38:5 | ||
| | ||
LL | 0 & x; | ||
| ^^^^^ | ||
|
||
error: this operation will always return zero. This is likely not the intended outcome | ||
--> $DIR/erasing_op.rs:8:5 | ||
--> $DIR/erasing_op.rs:39:5 | ||
| | ||
LL | 0 / x; | ||
| ^^^^^ | ||
|
||
error: aborting due to 3 previous errors | ||
error: this operation will always return zero. This is likely not the intended outcome | ||
--> $DIR/erasing_op.rs:41:5 | ||
| | ||
LL | 0 * Vec1 { x: 5 }; | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: this operation will always return zero. This is likely not the intended outcome | ||
--> $DIR/erasing_op.rs:42:5 | ||
| | ||
LL | Vec1 { x: 5 } * 0; | ||
| ^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 5 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters