elided_named_lifetimes: unify lint def & pass MissingLifetimeKind
This commit is contained in:
@@ -10,7 +10,7 @@ use rustc_data_structures::stable_hasher::{
|
||||
};
|
||||
use rustc_error_messages::{DiagMessage, MultiSpan};
|
||||
use rustc_hir::def::Namespace;
|
||||
use rustc_hir::{HashStableContext, HirId};
|
||||
use rustc_hir::{HashStableContext, HirId, MissingLifetimeKind};
|
||||
use rustc_macros::{Decodable, Encodable, HashStable_Generic};
|
||||
use rustc_span::edition::Edition;
|
||||
use rustc_span::symbol::{Ident, MacroRulesNormalizedIdent};
|
||||
@@ -556,6 +556,12 @@ pub enum DeprecatedSinceKind {
|
||||
InVersion(String),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ElidedLifetimeResolution {
|
||||
Static,
|
||||
Param(Symbol, Span),
|
||||
}
|
||||
|
||||
// This could be a closure, but then implementing derive trait
|
||||
// becomes hacky (and it gets allocated).
|
||||
#[derive(Debug)]
|
||||
@@ -568,12 +574,9 @@ pub enum BuiltinLintDiag {
|
||||
},
|
||||
MacroExpandedMacroExportsAccessedByAbsolutePaths(Span),
|
||||
ElidedLifetimesInPaths(usize, Span, bool, Span),
|
||||
ElidedIsStatic {
|
||||
elided: Span,
|
||||
},
|
||||
ElidedIsParam {
|
||||
elided: Span,
|
||||
param: (Symbol, Span),
|
||||
ElidedNamedLifetimes {
|
||||
elided: (Span, MissingLifetimeKind),
|
||||
resolution: ElidedLifetimeResolution,
|
||||
},
|
||||
UnknownCrateTypes {
|
||||
span: Span,
|
||||
|
||||
Reference in New Issue
Block a user