1
Fork 0

Implement elided_named_lifetimes lint

This commit is contained in:
Pavel Grigorenko 2024-08-15 18:05:59 +03:00
parent 0d634185df
commit 5d04472461
10 changed files with 154 additions and 20 deletions

View file

@ -863,8 +863,13 @@ pub enum LifetimeRes {
/// This variant is used for anonymous lifetimes that we did not resolve during
/// late resolution. Those lifetimes will be inferred by typechecking.
Infer,
/// Explicit `'static` lifetime.
Static,
/// `'static` lifetime.
Static {
/// We do not want to emit `elided_named_lifetimes`
/// when we are inside of a const item or a static,
/// because it would get too annoying.
suppress_elision_warning: bool,
},
/// Resolution failure.
Error,
/// HACK: This is used to recover the NodeId of an elided lifetime.