@@ -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 > ] ,
@@ -1106,7 +1106,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
11061106 defaultness,
11071107 has_delayed_lints : !self . delayed_lints . is_empty ( ) ,
11081108 trait_item_def_id : self
1109- . resolver
11101109 . get_partial_res ( i. id )
11111110 . map ( |r| r. expect_full_res ( ) . opt_def_id ( ) )
11121111 . unwrap_or ( None ) ,
@@ -1349,7 +1348,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
13491348 pub ( crate ) fn lower_coroutine_body_with_moved_arguments (
13501349 & mut self ,
13511350 decl : & FnDecl ,
1352- lower_body : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: Expr < ' hir > ,
1351+ lower_body : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: Expr < ' hir > ,
13531352 fn_decl_span : Span ,
13541353 body_span : Span ,
13551354 coroutine_kind : CoroutineKind ,
@@ -1486,7 +1485,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
14861485 parameters. push ( new_parameter) ;
14871486 }
14881487
1489- let mkbody = |this : & mut LoweringContext < ' _ , ' hir > | {
1488+ let mkbody = |this : & mut LoweringContext < ' hir > | {
14901489 // Create a block from the user's function body:
14911490 let user_body = lower_body ( this) ;
14921491
@@ -1688,11 +1687,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
16881687 } ;
16891688 let compute_is_param = || {
16901689 // Check if the where clause type is a plain type parameter.
1691- match self
1692- . resolver
1693- . get_partial_res ( bound_pred. bounded_ty . id )
1694- . and_then ( |r| r. full_res ( ) )
1695- {
1690+ match self . get_partial_res ( bound_pred. bounded_ty . id ) . and_then ( |r| r. full_res ( ) ) {
16961691 Some ( Res :: Def ( DefKind :: TyParam , def_id) )
16971692 if bound_pred. bound_generic_params . is_empty ( ) =>
16981693 {
@@ -1759,7 +1754,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
17591754
17601755 // Introduce extra lifetimes if late resolution tells us to.
17611756 let extra_lifetimes = self . resolver . extra_lifetime_params ( parent_node_id) ;
1762- params. extend ( extra_lifetimes. into_iter ( ) . filter_map ( |( ident, node_id, res) | {
1757+ params. extend ( extra_lifetimes. into_iter ( ) . filter_map ( |& ( ident, node_id, res) | {
17631758 self . lifetime_res_to_generic_param (
17641759 ident,
17651760 node_id,
@@ -1801,7 +1796,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
18011796 return ;
18021797 } ;
18031798 let define_opaque = define_opaque. iter ( ) . filter_map ( |( id, path) | {
1804- let res = self . resolver . get_partial_res ( * id) ;
1799+ let res = self . get_partial_res ( * id) ;
18051800 let Some ( did) = res. and_then ( |res| res. expect_full_res ( ) . opt_def_id ( ) ) else {
18061801 self . dcx ( ) . span_delayed_bug ( path. span , "should have errored in resolve" ) ;
18071802 return None ;
0 commit comments