unconditional_recursion false positive in PartialEq
with Deref
#12154
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
When implementing
PartialEq
for a custom smart pointer that usesDeref
for the implementation, specifically(**self).eq(&**other)
, the lint triggers.Lint Name
unconditional_recursion
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
No warning, the code does not recurse because of the deref in
**self
.Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: