rust-clippy/tests
bors c0939b18b8 Auto merge of #12409 - cookie-s:fix-identityop-duplicate-errors, r=Alexendoo
[`identity_op`]: Fix duplicate diagnostics

Relates to #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
2024-03-04 14:43:38 +00:00
..
test_utils
ui Auto merge of #12409 - cookie-s:fix-identityop-duplicate-errors, r=Alexendoo 2024-03-04 14:43:38 +00:00
ui-cargo Remove $DIR replacement in test output 2024-02-17 12:34:54 +00:00
ui-internal Show duplicate diagnostics in UI tests by default 2024-02-28 13:24:14 +00:00
ui-toml Merge remote-tracking branch 'upstream/master' into rustup 2024-02-22 15:59:29 +01:00
workspace_test
check-fmt.rs
clippy.toml
compile-test.rs Show duplicate diagnostics in UI tests by default 2024-02-28 13:24:14 +00:00
dogfood.rs
headers.rs Merge commit 'a859e5cc1ce100df22346a1005da30532d04de59' into clippyup 2023-12-16 14:12:50 +01:00
integration.rs Tweak delayed bug mentions. 2024-02-12 18:39:20 +11:00
lint_message_convention.rs
missing-test-files.rs
versioncheck.rs
workspace.rs