@@ -27,7 +27,7 @@ use super::{
27
27
28
28
pub ( super ) struct ItemLowerer < ' a , ' hir > {
29
29
pub ( super ) tcx : TyCtxt < ' hir > ,
30
- pub ( super ) resolver : & ' a mut ResolverAstLowering ,
30
+ pub ( super ) resolver : & ' hir ResolverAstLowering ,
31
31
pub ( super ) ast_index : & ' a IndexSlice < LocalDefId , AstOwner < ' a > > ,
32
32
pub ( super ) owners : & ' a mut IndexVec < LocalDefId , hir:: MaybeOwner < ' hir > > ,
33
33
}
@@ -57,7 +57,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
57
57
fn with_lctx (
58
58
& mut self ,
59
59
owner : NodeId ,
60
- f : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: OwnerNode < ' hir > ,
60
+ f : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: OwnerNode < ' hir > ,
61
61
) {
62
62
let mut lctx = LoweringContext :: new ( self . tcx , self . resolver ) ;
63
63
lctx. with_hir_id_owner ( owner, |lctx| f ( lctx) ) ;
@@ -101,7 +101,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
101
101
}
102
102
}
103
103
104
- impl < ' hir > LoweringContext < ' _ , ' hir > {
104
+ impl < ' hir > LoweringContext < ' hir > {
105
105
pub ( super ) fn lower_mod (
106
106
& mut self ,
107
107
items : & [ P < Item > ] ,
@@ -1157,7 +1157,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
1157
1157
}
1158
1158
} ,
1159
1159
trait_item_def_id : self
1160
- . resolver
1161
1160
. get_partial_res ( i. id )
1162
1161
. map ( |r| r. expect_full_res ( ) . opt_def_id ( ) )
1163
1162
. unwrap_or ( None ) ,
@@ -1395,7 +1394,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1395
1394
pub ( crate ) fn lower_coroutine_body_with_moved_arguments (
1396
1395
& mut self ,
1397
1396
decl : & FnDecl ,
1398
- lower_body : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: Expr < ' hir > ,
1397
+ lower_body : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: Expr < ' hir > ,
1399
1398
fn_decl_span : Span ,
1400
1399
body_span : Span ,
1401
1400
coroutine_kind : CoroutineKind ,
@@ -1532,7 +1531,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1532
1531
parameters. push ( new_parameter) ;
1533
1532
}
1534
1533
1535
- let mkbody = |this : & mut LoweringContext < ' _ , ' hir > | {
1534
+ let mkbody = |this : & mut LoweringContext < ' hir > | {
1536
1535
// Create a block from the user's function body:
1537
1536
let user_body = lower_body ( this) ;
1538
1537
@@ -1714,11 +1713,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1714
1713
} ;
1715
1714
let compute_is_param = || {
1716
1715
// 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 ( ) ) {
1722
1717
Some ( Res :: Def ( DefKind :: TyParam , def_id) )
1723
1718
if bound_pred. bound_generic_params . is_empty ( ) =>
1724
1719
{
@@ -1785,7 +1780,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1785
1780
1786
1781
// Introduce extra lifetimes if late resolution tells us to.
1787
1782
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) | {
1789
1784
self . lifetime_res_to_generic_param (
1790
1785
ident,
1791
1786
node_id,
@@ -1827,7 +1822,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1827
1822
return ;
1828
1823
} ;
1829
1824
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) ;
1831
1826
let Some ( did) = res. and_then ( |res| res. expect_full_res ( ) . opt_def_id ( ) ) else {
1832
1827
self . dcx ( ) . span_delayed_bug ( path. span , "should have errored in resolve" ) ;
1833
1828
return None ;
0 commit comments