c0939b18b8
[`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 |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
headers.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |