@@ -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 > ] ,
@@ -1097,7 +1097,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
1097
1097
defaultness,
1098
1098
has_delayed_lints : !self . delayed_lints . is_empty ( ) ,
1099
1099
trait_item_def_id : self
1100
- . resolver
1101
1100
. get_partial_res ( i. id )
1102
1101
. map ( |r| r. expect_full_res ( ) . opt_def_id ( ) )
1103
1102
. unwrap_or ( None ) ,
@@ -1340,7 +1339,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1340
1339
pub ( crate ) fn lower_coroutine_body_with_moved_arguments (
1341
1340
& mut self ,
1342
1341
decl : & FnDecl ,
1343
- lower_body : impl FnOnce ( & mut LoweringContext < ' _ , ' hir > ) -> hir:: Expr < ' hir > ,
1342
+ lower_body : impl FnOnce ( & mut LoweringContext < ' hir > ) -> hir:: Expr < ' hir > ,
1344
1343
fn_decl_span : Span ,
1345
1344
body_span : Span ,
1346
1345
coroutine_kind : CoroutineKind ,
@@ -1477,7 +1476,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1477
1476
parameters. push ( new_parameter) ;
1478
1477
}
1479
1478
1480
- let mkbody = |this : & mut LoweringContext < ' _ , ' hir > | {
1479
+ let mkbody = |this : & mut LoweringContext < ' hir > | {
1481
1480
// Create a block from the user's function body:
1482
1481
let user_body = lower_body ( this) ;
1483
1482
@@ -1679,11 +1678,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1679
1678
} ;
1680
1679
let compute_is_param = || {
1681
1680
// 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 ( ) ) {
1687
1682
Some ( Res :: Def ( DefKind :: TyParam , def_id) )
1688
1683
if bound_pred. bound_generic_params . is_empty ( ) =>
1689
1684
{
@@ -1750,7 +1745,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1750
1745
1751
1746
// Introduce extra lifetimes if late resolution tells us to.
1752
1747
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) | {
1754
1749
self . lifetime_res_to_generic_param (
1755
1750
ident,
1756
1751
node_id,
@@ -1792,7 +1787,7 @@ impl<'hir> LoweringContext<'_, 'hir> {
1792
1787
return ;
1793
1788
} ;
1794
1789
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) ;
1796
1791
let Some ( did) = res. and_then ( |res| res. expect_full_res ( ) . opt_def_id ( ) ) else {
1797
1792
self . dcx ( ) . span_delayed_bug ( path. span , "should have errored in resolve" ) ;
1798
1793
return None ;
0 commit comments