@@ -27,7 +27,7 @@ use super::{
2727
2828pub ( super ) struct ItemLowerer < ' a , ' hir > {
2929 pub ( super ) tcx : TyCtxt < ' hir > ,
30- pub ( super ) resolver : & ' a mut ResolverAstLowering ,
30+ pub ( super ) resolver : & ' hir ResolverAstLowering ,
3131 pub ( super ) ast_index : & ' a IndexSlice < LocalDefId , AstOwner < ' a > > ,
3232 pub ( super ) owners : & ' a mut IndexVec < LocalDefId , hir:: MaybeOwner < ' hir > > ,
3333}
@@ -57,7 +57,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
5757 fn with_lctx (
5858 & mut self ,
5959 owner : NodeId ,
60- f : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: OwnerNode < ' hir > ,
60+ f : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: OwnerNode < ' hir > ,
6161 ) {
6262 let mut lctx = LoweringContext :: new ( self . tcx , self . resolver ) ;
6363 lctx. with_hir_id_owner ( owner, |lctx| f ( lctx) ) ;
@@ -101,7 +101,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
101101 }
102102}
103103
104- impl < ' hir > LoweringContext < ' _ , ' hir > {
104+ impl < ' hir > LoweringContext < ' hir > {
105105 pub ( super ) fn lower_mod (
106106 & mut self ,
107107 items : & [ P < Item > ] ,
@@ -1157,7 +1157,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
11571157 }
11581158 } ,
11591159 trait_item_def_id : self
1160- . resolver
11611160 . get_partial_res ( i. id )
11621161 . map ( |r| r. expect_full_res ( ) . opt_def_id ( ) )
11631162 . unwrap_or ( None ) ,
@@ -1395,7 +1394,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
13951394 pub ( crate ) fn lower_coroutine_body_with_moved_arguments (
13961395 & mut self ,
13971396 decl : & FnDecl ,
1398- lower_body : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: Expr < ' hir > ,
1397+ lower_body : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: Expr < ' hir > ,
13991398 fn_decl_span : Span ,
14001399 body_span : Span ,
14011400 coroutine_kind : CoroutineKind ,
@@ -1532,7 +1531,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
15321531 parameters. push ( new_parameter) ;
15331532 }
15341533
1535- let mkbody = |this : & mut LoweringContext < ' _ , ' hir > | {
1534+ let mkbody = |this : & mut LoweringContext < ' hir > | {
15361535 // Create a block from the user's function body:
15371536 let user_body = lower_body ( this) ;
15381537
@@ -1714,11 +1713,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17141713 } ;
17151714 let compute_is_param = || {
17161715 // Check if the where clause type is a plain type parameter.
1717- match self
1718- . resolver
1719- . get_partial_res ( bound_pred. bounded_ty . id )
1720- . and_then ( |r| r. full_res ( ) )
1721- {
1716+ match self . get_partial_res ( bound_pred. bounded_ty . id ) . and_then ( |r| r. full_res ( ) ) {
17221717 Some ( Res :: Def ( DefKind :: TyParam , def_id) )
17231718 if bound_pred. bound_generic_params . is_empty ( ) =>
17241719 {
@@ -1785,7 +1780,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17851780
17861781 // Introduce extra lifetimes if late resolution tells us to.
17871782 let extra_lifetimes = self . resolver . extra_lifetime_params ( parent_node_id) ;
1788- params. extend ( extra_lifetimes. into_iter ( ) . filter_map ( |( ident, node_id, res) | {
1783+ params. extend ( extra_lifetimes. into_iter ( ) . filter_map ( |& ( ident, node_id, res) | {
17891784 self . lifetime_res_to_generic_param (
17901785 ident,
17911786 node_id,
@@ -1827,7 +1822,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
18271822 return ;
18281823 } ;
18291824 let define_opaque = define_opaque. iter ( ) . filter_map ( |( id, path) | {
1830- let res = self . resolver . get_partial_res ( * id) ;
1825+ let res = self . get_partial_res ( * id) ;
18311826 let Some ( did) = res. and_then ( |res| res. expect_full_res ( ) . opt_def_id ( ) ) else {
18321827 self . dcx ( ) . span_delayed_bug ( path. span , "should have errored in resolve" ) ;
18331828 return None ;
0 commit comments