rust/clippy_lints/src/operators
bors 2d9d404448 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
2024-03-05 14:34:56 +00:00
..
absurd_extreme_comparisons.rs Merge commit '435a8ad86c' into clippyup 2023-05-20 15:39:26 +02:00
arithmetic_side_effects.rs Fix NonZero clippy lints. 2024-01-27 16:38:57 +01:00
assign_op_pattern.rs Merge commit 'edb720b199' into clippyup 2023-11-16 19:13:24 +01:00
bit_mask.rs Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
cmp_owned.rs Merge commit '2b030eb03d' into clippyup 2023-10-21 14:16:11 +02:00
const_comparisons.rs Merge commit 'edb720b199' into clippyup 2023-11-16 19:13:24 +01:00
double_comparison.rs Remove '#[expect(clippy::similar_names)]' where needed to pass dogfood tests 2024-02-09 23:39:36 -06:00
duration_subsec.rs Merge commit '435a8ad86c' into clippyup 2023-05-20 15:39:26 +02:00
eq_op.rs Merge commit 'f0cdee4a3f' into clippy-subtree-sync 2023-12-01 18:21:58 +01:00
erasing_op.rs Merge commit '0cb0f76368' into clippyup 2022-06-30 10:50:09 +02:00
float_cmp.rs Merge commit 'edb720b199' into clippyup 2023-11-16 19:13:24 +01:00
float_equality_without_abs.rs Merge commit 'edb720b199' into clippyup 2023-11-16 19:13:24 +01:00
identity_op.rs [identity_op]: Fix duplicate errors 2024-03-03 19:25:51 -05:00
integer_division.rs Merge commit '0cb0f76368' into clippyup 2022-06-30 10:50:09 +02:00
misrefactored_assign_op.rs [misrefactored_assign_op]: Fix duplicate diagnostics 2024-03-05 19:53:26 +08:00
mod.rs Merge commit '60cb29c5e4' into clippyup 2024-02-08 20:24:42 +01:00
modulo_arithmetic.rs hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent} 2024-02-10 12:24:46 +03:00
modulo_one.rs Merge commit '0cb0f76368' into clippyup 2022-06-30 10:50:09 +02:00
needless_bitwise_bool.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
numeric_arithmetic.rs Minimize pub usage in source_map.rs. 2023-11-02 19:35:00 +11:00
op_ref.rs Remove '#[expect(clippy::similar_names)]' where needed to pass dogfood tests 2024-02-09 23:39:36 -06:00
ptr_eq.rs Merge commit '66c29b973b' into clippy-subtree-update 2024-01-25 19:17:36 +01:00
self_assignment.rs Merge commit 'ac0e10aa68' into clippyup 2022-10-06 09:44:38 +02:00
verbose_bit_mask.rs Pack the u128 in LitKind::Int 2024-01-19 20:10:39 -08:00