clippy::only_used_in_recursion
considers self
, but unused_variables
does not
#10370
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
clippy::only_used_in_recursion
can trip onself
in methods. While this is technically correct, it is inconsistent with rustc'sunused_variables
lint.Lint Name
clippy::only_used_in_recursion
Reproducer
I tried this code (playground):
I saw this happen:
I expected to see this happen: No warnings
Note that if the body of
LowerState::find_id
is replaced withtodo!()
,self
is not marked as unused (playground):Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: