extra_unused_lifetimes
false positive regression from 1.82 to 1.83
#13578
Labels
C-bug
Category: Clippy is not doing the correct thing
Summary
I believe the following to be a regression in a new false positive for the
extra_unused_lifetimes
lint for 1.83.The suggestion is to remove a lifetime
'a
, but it is used in thewhere
bound for&'a T: Foo
. It's not valid to usewhere &'_ T: Foo
and I also believewhere for<'a> &'a T: Foo
to have a different meaning, so I do not see a way to remove'a
from theimpl
.I am of course happy to be wrong, in which case TIL! 😄
Reproducer
I tried this code:
I expected to see this happen: no lint warning. (This is the case on 1.82 stable.)
Instead, this happened:
I observe this on 1.83.0-beta.2
Version
rustc 1.83.0-beta.2 (88c1c3c11 2024-10-18)
binary: rustc
commit-hash: 88c1c3c1102bbf3860891bfa52b7ddd9f26aec2f
commit-date: 2024-10-18
host: aarch64-apple-darwin
release: 1.83.0-beta.2
LLVM version: 19.1.1
Additional Labels
No response
The text was updated successfully, but these errors were encountered: