@@ -14,7 +14,7 @@ use rustc_hir::intravisit::{
1414} ;
1515use rustc_hir:: {
1616 AmbigArg , BareFnTy , BodyId , FnDecl , FnSig , GenericArg , GenericArgs , GenericBound , GenericParam , GenericParamKind ,
17- Generics , HirId , Impl , ImplItem , ImplItemKind , Item , ItemKind , Lifetime , LifetimeName , LifetimeParamKind , Node ,
17+ Generics , HirId , Impl , ImplItem , ImplItemKind , Item , ItemKind , Lifetime , LifetimeKind , LifetimeParamKind , Node ,
1818 PolyTraitRef , PredicateOrigin , TraitFn , TraitItem , TraitItemKind , Ty , TyKind , WhereBoundPredicate , WherePredicate ,
1919 WherePredicateKind , lang_items,
2020} ;
@@ -218,7 +218,7 @@ fn check_fn_inner<'tcx>(
218218 for bound in pred. bounds {
219219 let mut visitor = RefVisitor :: new ( cx) ;
220220 walk_param_bound ( & mut visitor, bound) ;
221- if visitor. lts . iter ( ) . any ( |lt| matches ! ( lt. res , LifetimeName :: Param ( _) ) ) {
221+ if visitor. lts . iter ( ) . any ( |lt| matches ! ( lt. kind , LifetimeKind :: Param ( _) ) ) {
222222 return ;
223223 }
224224 if let GenericBound :: Trait ( ref trait_ref) = * bound {
@@ -235,7 +235,7 @@ fn check_fn_inner<'tcx>(
235235 _ => None ,
236236 } ) ;
237237 for bound in lifetimes {
238- if bound. res != LifetimeName :: Static && !bound. is_elided ( ) {
238+ if bound. kind != LifetimeKind :: Static && !bound. is_elided ( ) {
239239 return ;
240240 }
241241 }
@@ -421,8 +421,8 @@ fn named_lifetime_occurrences(lts: &[Lifetime]) -> Vec<(LocalDefId, usize)> {
421421}
422422
423423fn named_lifetime ( lt : & Lifetime ) -> Option < LocalDefId > {
424- match lt. res {
425- LifetimeName :: Param ( id) if !lt. is_anonymous ( ) => Some ( id) ,
424+ match lt. kind {
425+ LifetimeKind :: Param ( id) if !lt. is_anonymous ( ) => Some ( id) ,
426426 _ => None ,
427427 }
428428}
@@ -614,7 +614,7 @@ where
614614
615615 // for lifetimes as parameters of generics
616616 fn visit_lifetime ( & mut self , lifetime : & ' tcx Lifetime ) {
617- if let LifetimeName :: Param ( def_id) = lifetime. res
617+ if let LifetimeKind :: Param ( def_id) = lifetime. kind
618618 && let Some ( usages) = self . map . get_mut ( & def_id)
619619 {
620620 usages. push ( Usage {
@@ -826,7 +826,7 @@ fn report_elidable_lifetimes(
826826 . iter ( )
827827 . map ( |& lt| cx. tcx . def_span ( lt) )
828828 . chain ( usages. iter ( ) . filter_map ( |usage| {
829- if let LifetimeName :: Param ( def_id) = usage. res
829+ if let LifetimeKind :: Param ( def_id) = usage. kind
830830 && elidable_lts. contains ( & def_id)
831831 {
832832 return Some ( usage. ident . span ) ;
0 commit comments