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#12409 - cookie-s:fix-identityop-duplicate-err…
…ors, r=Alexendoo [`identity_op`]: Fix duplicate diagnostics Relates to rust-lang#12379 In the `identity_op` lint, the following diagnostic was emitted two times ``` --> tests/ui/identity_op.rs:156:5 | LL | 1 * 1; | ^^^^^ help: consider reducing it to: `1` | ``` because both of the left operand and the right operand are the identity element of the multiplication. This PR fixes the issue so that if a diagnostic is created for an operand, the check of the other operand will be skipped. It's fine because the result is always the same in the affected operators. --- changelog: [`identity_op`]: Fix duplicate diagnostics
- Loading branch information
Showing
4 changed files
with
73 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
//@compile-flags: -Zdeduplicate-diagnostics=yes | ||
|
||
#![warn(clippy::identity_op)] | ||
#![allow(unused)] | ||
#![allow( | ||
|
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,5 +1,3 @@ | ||
//@compile-flags: -Zdeduplicate-diagnostics=yes | ||
|
||
#![warn(clippy::identity_op)] | ||
#![allow(unused)] | ||
#![allow( | ||
|
Oops, something went wrong.