@@ -505,7 +505,7 @@ enum MaybeExported<'a> {
505505}
506506
507507impl MaybeExported < ' _ > {
508- fn eval ( self , r : & Resolver < ' _ > ) -> bool {
508+ fn eval ( self , r : & Resolver < ' _ , ' _ > ) -> bool {
509509 let def_id = match self {
510510 MaybeExported :: Ok ( node_id) => Some ( r. local_def_id ( node_id) ) ,
511511 MaybeExported :: Impl ( Some ( trait_def_id) ) | MaybeExported :: ImplItem ( Ok ( trait_def_id) ) => {
@@ -584,8 +584,8 @@ struct DiagnosticMetadata<'ast> {
584584 current_elision_failures : Vec < MissingLifetime > ,
585585}
586586
587- struct LateResolutionVisitor < ' a , ' b , ' ast > {
588- r : & ' b mut Resolver < ' a > ,
587+ struct LateResolutionVisitor < ' a , ' b , ' ast , ' tcx > {
588+ r : & ' b mut Resolver < ' a , ' tcx > ,
589589
590590 /// The module that represents the current item scope.
591591 parent_scope : ParentScope < ' a > ,
@@ -628,7 +628,7 @@ struct LateResolutionVisitor<'a, 'b, 'ast> {
628628}
629629
630630/// Walks the whole crate in DFS order, visiting each item, resolving names as it goes.
631- impl < ' a : ' ast , ' ast > Visitor < ' ast > for LateResolutionVisitor < ' a , ' _ , ' ast > {
631+ impl < ' a : ' ast , ' ast , ' tcx > Visitor < ' ast > for LateResolutionVisitor < ' a , ' _ , ' ast , ' tcx > {
632632 fn visit_attribute ( & mut self , _: & ' ast Attribute ) {
633633 // We do not want to resolve expressions that appear in attributes,
634634 // as they do not correspond to actual code.
@@ -1199,8 +1199,8 @@ impl<'a: 'ast, 'ast> Visitor<'ast> for LateResolutionVisitor<'a, '_, 'ast> {
11991199 }
12001200}
12011201
1202- impl < ' a : ' ast , ' b , ' ast > LateResolutionVisitor < ' a , ' b , ' ast > {
1203- fn new ( resolver : & ' b mut Resolver < ' a > ) -> LateResolutionVisitor < ' a , ' b , ' ast > {
1202+ impl < ' a : ' ast , ' b , ' ast , ' tcx > LateResolutionVisitor < ' a , ' b , ' ast , ' tcx > {
1203+ fn new ( resolver : & ' b mut Resolver < ' a , ' tcx > ) -> LateResolutionVisitor < ' a , ' b , ' ast , ' tcx > {
12041204 // During late resolution we only track the module component of the parent scope,
12051205 // although it may be useful to track other components as well for diagnostics.
12061206 let graph_root = resolver. graph_root ;
@@ -2029,13 +2029,13 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
20292029
20302030 /// List all the lifetimes that appear in the provided type.
20312031 fn find_lifetime_for_self ( & self , ty : & ' ast Ty ) -> Set1 < LifetimeRes > {
2032- struct SelfVisitor < ' r , ' a > {
2033- r : & ' r Resolver < ' a > ,
2032+ struct SelfVisitor < ' r , ' a , ' tcx > {
2033+ r : & ' r Resolver < ' a , ' tcx > ,
20342034 impl_self : Option < Res > ,
20352035 lifetime : Set1 < LifetimeRes > ,
20362036 }
20372037
2038- impl SelfVisitor < ' _ , ' _ > {
2038+ impl SelfVisitor < ' _ , ' _ , ' _ > {
20392039 // Look for `self: &'a Self` - also desugared from `&'a self`,
20402040 // and if that matches, use it for elision and return early.
20412041 fn is_self_ty ( & self , ty : & Ty ) -> bool {
@@ -2053,7 +2053,7 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
20532053 }
20542054 }
20552055
2056- impl < ' a > Visitor < ' a > for SelfVisitor < ' _ , ' _ > {
2056+ impl < ' a > Visitor < ' a > for SelfVisitor < ' _ , ' _ , ' _ > {
20572057 fn visit_ty ( & mut self , ty : & ' a Ty ) {
20582058 trace ! ( "SelfVisitor considering ty={:?}" , ty) ;
20592059 if let TyKind :: Ref ( lt, ref mt) = ty. kind && self . is_self_ty ( & mt. ty ) {
@@ -4288,13 +4288,13 @@ impl<'a: 'ast, 'b, 'ast> LateResolutionVisitor<'a, 'b, 'ast> {
42884288 }
42894289}
42904290
4291- struct LifetimeCountVisitor < ' a , ' b > {
4292- r : & ' b mut Resolver < ' a > ,
4291+ struct LifetimeCountVisitor < ' a , ' b , ' tcx > {
4292+ r : & ' b mut Resolver < ' a , ' tcx > ,
42934293}
42944294
42954295/// Walks the whole crate in DFS order, visiting each item, counting the declared number of
42964296/// lifetime generic parameters.
4297- impl < ' ast > Visitor < ' ast > for LifetimeCountVisitor < ' _ , ' _ > {
4297+ impl < ' ast > Visitor < ' ast > for LifetimeCountVisitor < ' _ , ' _ , ' _ > {
42984298 fn visit_item ( & mut self , item : & ' ast Item ) {
42994299 match & item. kind {
43004300 ItemKind :: TyAlias ( box TyAlias { ref generics, .. } )
@@ -4328,7 +4328,7 @@ impl<'ast> Visitor<'ast> for LifetimeCountVisitor<'_, '_> {
43284328 }
43294329}
43304330
4331- impl < ' a > Resolver < ' a > {
4331+ impl < ' a , ' tcx > Resolver < ' a , ' tcx > {
43324332 pub ( crate ) fn late_resolve_crate ( & mut self , krate : & Crate ) {
43334333 visit:: walk_crate ( & mut LifetimeCountVisitor { r : self } , krate) ;
43344334 let mut late_resolution_visitor = LateResolutionVisitor :: new ( self ) ;
0 commit comments