Tracking issue for lifetime_underscore
compatibility lint
#36892
Labels
A-lint
Area: Lints (warnings about flaws in source code) such as unused_mut.
B-unstable
Blocker: Implemented in the nightly compiler and unstable.
What is this lint about
Lifetime name
'_
is reserved for possible future use as a lifetime placeholder, similarly to how_
is used as a placeholder in types or patterns (see, for example, rust-lang/rfcs#1177).Earlier versions of the compiler accepted
'_
as a normal lifetime or label name, #33794 fixed this oversight.How to fix this warning/error
Rename the lifetime or label named
'_
into something else, like'a
or'z
.Current status
lifetime_underscore
lint as warn-by-defaultlifetime_underscore
lint deny-by-defaultlifetime_underscore
lint a hard errorThe text was updated successfully, but these errors were encountered: