about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-03-05 14:34:56 +0000
committerbors <bors@rust-lang.org>2024-03-05 14:34:56 +0000
commit2d9d404448cd818735eaa2803d24de219667abf8 (patch)
treefe66b55da92745163386128d0d99c33ea755ba4e /compiler/rustc_codegen_llvm/src/errors.rs
parent21efd39b04b731ad1ae189334bc39c37e7dc0b6f (diff)
parent3c5008e8de394b7bdab715704b4bbb0fb7c4d37b (diff)
downloadrust-2d9d404448cd818735eaa2803d24de219667abf8.tar.gz
rust-2d9d404448cd818735eaa2803d24de219667abf8.zip
Auto merge of #12413 - high-cloud:fix_assign_ops2, r=flip1995
[`misrefactored_assign_op`]: Fix duplicate diagnostics

Relate to #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
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions