identity_op
in some scenarios
#13813
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
I find myself disabling
identity_op
lint over and over again.When complaining about identity ops clippy should look around. If there's a similar construct in nearby context but the op is not an identity - clippy should keep quiet.
Lint Name
clippy::identity_op
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Code is accepted as is - the op is identity, but it is there to maintain code uniformity
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: