@@ -28,7 +28,7 @@ use super::{
2828
2929pub ( super ) struct ItemLowerer < ' a , ' hir > {
3030 pub ( super ) tcx : TyCtxt < ' hir > ,
31- pub ( super ) resolver : & ' a mut ResolverAstLowering ,
31+ pub ( super ) resolver : & ' hir ResolverAstLowering ,
3232 pub ( super ) ast_index : & ' a IndexSlice < LocalDefId , AstOwner < ' a > > ,
3333 pub ( super ) owners : & ' a mut IndexVec < LocalDefId , hir:: MaybeOwner < ' hir > > ,
3434}
@@ -58,7 +58,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
5858 fn with_lctx (
5959 & mut self ,
6060 owner : NodeId ,
61- f : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: OwnerNode < ' hir > ,
61+ f : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: OwnerNode < ' hir > ,
6262 ) {
6363 let mut lctx = LoweringContext :: new ( self . tcx , self . resolver ) ;
6464 lctx. with_hir_id_owner ( owner, |lctx| f ( lctx) ) ;
@@ -102,7 +102,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
102102 }
103103}
104104
105- impl < ' hir > LoweringContext < ' _ , ' hir > {
105+ impl < ' hir > LoweringContext < ' hir > {
106106 pub ( super ) fn lower_mod (
107107 & mut self ,
108108 items : & [ P < Item > ] ,
@@ -1097,7 +1097,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
10971097 defaultness,
10981098 has_delayed_lints : !self . delayed_lints . is_empty ( ) ,
10991099 trait_item_def_id : self
1100- . resolver
11011100 . get_partial_res ( i. id )
11021101 . map ( |r| r. expect_full_res ( ) . opt_def_id ( ) )
11031102 . unwrap_or ( None ) ,
@@ -1340,7 +1339,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
13401339 pub ( crate ) fn lower_coroutine_body_with_moved_arguments (
13411340 & mut self ,
13421341 decl : & FnDecl ,
1343- lower_body : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: Expr < ' hir > ,
1342+ lower_body : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: Expr < ' hir > ,
13441343 fn_decl_span : Span ,
13451344 body_span : Span ,
13461345 coroutine_kind : CoroutineKind ,
@@ -1477,7 +1476,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
14771476 parameters. push ( new_parameter) ;
14781477 }
14791478
1480- let mkbody = |this : & mut LoweringContext < ' _ , ' hir > | {
1479+ let mkbody = |this : & mut LoweringContext < ' hir > | {
14811480 // Create a block from the user's function body:
14821481 let user_body = lower_body ( this) ;
14831482
@@ -1679,11 +1678,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
16791678 } ;
16801679 let compute_is_param = || {
16811680 // Check if the where clause type is a plain type parameter.
1682- match self
1683- . resolver
1684- . get_partial_res ( bound_pred. bounded_ty . id )
1685- . and_then ( |r| r. full_res ( ) )
1686- {
1681+ match self . get_partial_res ( bound_pred. bounded_ty . id ) . and_then ( |r| r. full_res ( ) ) {
16871682 Some ( Res :: Def ( DefKind :: TyParam , def_id) )
16881683 if bound_pred. bound_generic_params . is_empty ( ) =>
16891684 {
@@ -1750,7 +1745,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17501745
17511746 // Introduce extra lifetimes if late resolution tells us to.
17521747 let extra_lifetimes = self . resolver . extra_lifetime_params ( parent_node_id) ;
1753- params. extend ( extra_lifetimes. into_iter ( ) . filter_map ( |( ident, node_id, res) | {
1748+ params. extend ( extra_lifetimes. into_iter ( ) . filter_map ( |& ( ident, node_id, res) | {
17541749 self . lifetime_res_to_generic_param (
17551750 ident,
17561751 node_id,
@@ -1792,7 +1787,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17921787 return ;
17931788 } ;
17941789 let define_opaque = define_opaque. iter ( ) . filter_map ( |( id, path) | {
1795- let res = self . resolver . get_partial_res ( * id) ;
1790+ let res = self . get_partial_res ( * id) ;
17961791 let Some ( did) = res. and_then ( |res| res. expect_full_res ( ) . opt_def_id ( ) ) else {
17971792 self . dcx ( ) . span_delayed_bug ( path. span , "should have errored in resolve" ) ;
17981793 return None ;
0 commit comments