rust/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 Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
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 Merge commit '09ac14c901' into clippyup 2023-11-02 17:35:56 +01:00
headers.rs Merge commit 'a859e5cc1c' 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 Merge commit 'd9c24d1b1e' into clippyup 2023-07-17 10:22:32 +02:00
missing-test-files.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00
versioncheck.rs Merge commit '09ac14c901' into clippyup 2023-11-02 17:35:56 +01:00
workspace.rs Merge commit '37f4c1725d' into clippyup 2023-07-02 14:59:02 +02:00