@@ -293,11 +293,6 @@ impl<'tcx> ResolverAstLowering<'tcx> {
293293 self . import_res_map . get ( & id) . copied ( ) . unwrap_or_default ( )
294294 }
295295
296- /// Obtains resolution for a lifetime with the given `NodeId`.
297- fn get_lifetime_res ( & self , id : NodeId ) -> Option < LifetimeRes > {
298- self . lifetimes_res_map . get ( & id) . copied ( )
299- }
300-
301296 /// Obtain the list of lifetimes parameters to add to an item.
302297 ///
303298 /// Extra lifetime parameters should only be added in places that can appear
@@ -1616,7 +1611,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
16161611
16171612 None => {
16181613 let id = if let Some ( LifetimeRes :: ElidedAnchor { start, end } ) =
1619- self . resolver . get_lifetime_res ( t. id )
1614+ self . owner . get_lifetime_res ( t. id )
16201615 {
16211616 assert_eq ! ( start. plus( 1 ) , end) ;
16221617 start
@@ -2025,7 +2020,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
20252020 source : LifetimeSource ,
20262021 syntax : LifetimeSyntax ,
20272022 ) -> & ' hir hir:: Lifetime {
2028- let res = if let Some ( res) = self . resolver . get_lifetime_res ( id) {
2023+ let res = if let Some ( res) = self . owner . get_lifetime_res ( id) {
20292024 match res {
20302025 LifetimeRes :: Param { param, .. } => hir:: LifetimeKind :: Param ( param) ,
20312026 LifetimeRes :: Fresh { param, .. } => {
@@ -2111,13 +2106,12 @@ impl<'hir> LoweringContext<'_, 'hir> {
21112106 // AST resolution emitted an error on those parameters, so we lower them using
21122107 // `ParamName::Error`.
21132108 let ident = self . lower_ident ( param. ident ) ;
2114- let param_name = if let Some ( LifetimeRes :: Error ( ..) ) =
2115- self . resolver . get_lifetime_res ( param. id )
2116- {
2117- ParamName :: Error ( ident)
2118- } else {
2119- ParamName :: Plain ( ident)
2120- } ;
2109+ let param_name =
2110+ if let Some ( LifetimeRes :: Error ( ..) ) = self . owner . get_lifetime_res ( param. id ) {
2111+ ParamName :: Error ( ident)
2112+ } else {
2113+ ParamName :: Plain ( ident)
2114+ } ;
21212115 let kind =
21222116 hir:: GenericParamKind :: Lifetime { kind : hir:: LifetimeParamKind :: Explicit } ;
21232117
0 commit comments