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#12413 - high-cloud:fix_assign_ops2, r=flip1995
[`misrefactored_assign_op`]: Fix duplicate diagnostics Relate to rust-lang#12379 The following diagnostics appear twice ``` --> tests/ui/assign_ops2.rs:26:5 | LL | a *= a * a; | ^^^^^^^^^^ | help: did you mean `a = a * a` or `a = a * a * a`? Consider replacing it with ``` because `a` (lhs) appears in both left operand and right operand in the right hand side. 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: [`misrefactored_assign_op`]: Fix duplicate diagnostics
- Loading branch information
Showing
3 changed files
with
12 additions
and
15 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