@@ -28,7 +28,7 @@ use super::{
28
28
29
29
pub ( super ) struct ItemLowerer < ' a , ' hir > {
30
30
pub ( super ) tcx : TyCtxt < ' hir > ,
31
- pub ( super ) resolver : & ' a mut ResolverAstLowering ,
31
+ pub ( super ) resolver : & ' hir ResolverAstLowering ,
32
32
pub ( super ) ast_index : & ' a IndexSlice < LocalDefId , AstOwner < ' a > > ,
33
33
pub ( super ) owners : & ' a mut IndexVec < LocalDefId , hir:: MaybeOwner < ' hir > > ,
34
34
}
@@ -58,7 +58,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
58
58
fn with_lctx (
59
59
& mut self ,
60
60
owner : NodeId ,
61
- f : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: OwnerNode < ' hir > ,
61
+ f : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: OwnerNode < ' hir > ,
62
62
) {
63
63
let mut lctx = LoweringContext :: new ( self . tcx , self . resolver ) ;
64
64
lctx. with_hir_id_owner ( owner, |lctx| f ( lctx) ) ;
@@ -102,7 +102,7 @@ impl<'a, 'hir> ItemLowerer<'a, 'hir> {
102
102
}
103
103
}
104
104
105
- impl < ' hir > LoweringContext < ' _ , ' hir > {
105
+ impl < ' hir > LoweringContext < ' hir > {
106
106
pub ( super ) fn lower_mod (
107
107
& mut self ,
108
108
items : & [ P < Item > ] ,
@@ -1106,7 +1106,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
1106
1106
defaultness,
1107
1107
has_delayed_lints : !self . delayed_lints . is_empty ( ) ,
1108
1108
trait_item_def_id : self
1109
- . resolver
1110
1109
. get_partial_res ( i. id )
1111
1110
. map ( |r| r. expect_full_res ( ) . opt_def_id ( ) )
1112
1111
. unwrap_or ( None ) ,
@@ -1349,7 +1348,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1349
1348
pub ( crate ) fn lower_coroutine_body_with_moved_arguments (
1350
1349
& mut self ,
1351
1350
decl : & FnDecl ,
1352
- lower_body : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: Expr < ' hir > ,
1351
+ lower_body : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: Expr < ' hir > ,
1353
1352
fn_decl_span : Span ,
1354
1353
body_span : Span ,
1355
1354
coroutine_kind : CoroutineKind ,
@@ -1486,7 +1485,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1486
1485
parameters. push ( new_parameter) ;
1487
1486
}
1488
1487
1489
- let mkbody = |this : & mut LoweringContext < ' _ , ' hir > | {
1488
+ let mkbody = |this : & mut LoweringContext < ' hir > | {
1490
1489
// Create a block from the user's function body:
1491
1490
let user_body = lower_body ( this) ;
1492
1491
@@ -1688,11 +1687,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1688
1687
} ;
1689
1688
let compute_is_param = || {
1690
1689
// 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 ( ) ) {
1696
1691
Some ( Res :: Def ( DefKind :: TyParam , def_id) )
1697
1692
if bound_pred. bound_generic_params . is_empty ( ) =>
1698
1693
{
@@ -1759,7 +1754,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1759
1754
1760
1755
// Introduce extra lifetimes if late resolution tells us to.
1761
1756
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) | {
1763
1758
self . lifetime_res_to_generic_param (
1764
1759
ident,
1765
1760
node_id,
@@ -1801,7 +1796,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1801
1796
return ;
1802
1797
} ;
1803
1798
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) ;
1805
1800
let Some ( did) = res. and_then ( |res| res. expect_full_res ( ) . opt_def_id ( ) ) else {
1806
1801
self . dcx ( ) . span_delayed_bug ( path. span , "should have errored in resolve" ) ;
1807
1802
return None ;
0 commit comments