single_use_lifetimes
: false positive (suggests unstable anonymous lifetimes in impl Trait
)
#129255
Labels
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
F-lint-single_use_lifetimes
`single_use_lifetimes` lint
Consider this code (playground):
The warning is issued:
warning: lifetime parameter `'a` only used once
. However, removing the lifetime as suggested makes code to not compile:So the compiler contradicts itself.
I suspect
single_use_lifetimes
does not correctly verify whether the compiler feature is available. My understanding is that it will be stabilized in 2024 edition (#117587).Meta
I tried in the playground by setting "nightly" and both 2021 and 2024 editions, and the problem is currently still there.
The text was updated successfully, but these errors were encountered: