use_self
false negative on tuple or struct enum variants
#8845
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
use_self
doesn't trigger for struct or tuple enum variants, only empty variants.There are false negatives mentioned in the documention for use_self but I couldn't find an issue tracking them. I don't know if these are the same known false negatives or not.
Lint Name
use_self
Reproducer
I tried this code:
I expected to see this happen:
I should get a warning for all four uses of
Something
in get_value.Instead, this happened:
I only get a warning for
Something::Empty
. Once I update it toSelf::Empty
I get no more warnings.Version
The text was updated successfully, but these errors were encountered: