@@ -494,7 +494,6 @@ enum GenericArgsMode {
494
494
impl < ' a , ' hir > LoweringContext < ' a , ' hir > {
495
495
fn create_def (
496
496
& mut self ,
497
- parent : LocalDefId ,
498
497
node_id : ast:: NodeId ,
499
498
name : Option < Symbol > ,
500
499
def_kind : DefKind ,
@@ -509,7 +508,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
509
508
self . tcx. hir_def_key( self . local_def_id( node_id) ) ,
510
509
) ;
511
510
512
- let def_id = self . tcx . at ( span) . create_def ( parent, name, def_kind) . def_id ( ) ;
511
+ let def_id =
512
+ self . tcx . at ( span) . create_def ( self . current_hir_id_owner . def_id , name, def_kind) . def_id ( ) ;
513
513
514
514
debug ! ( "create_def: def_id_to_node_id[{:?}] <-> {:?}" , def_id, node_id) ;
515
515
self . resolver . node_id_to_def_id . insert ( node_id, def_id) ;
@@ -781,7 +781,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
781
781
LifetimeRes :: Fresh { param, kind, .. } => {
782
782
// Late resolution delegates to us the creation of the `LocalDefId`.
783
783
let _def_id = self . create_def (
784
- self . current_hir_id_owner . def_id ,
785
784
param,
786
785
Some ( kw:: UnderscoreLifetime ) ,
787
786
DefKind :: LifetimeParam ,
@@ -2069,15 +2068,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
2069
2068
} else {
2070
2069
// Construct an AnonConst where the expr is the "ty"'s path.
2071
2070
2072
- let parent_def_id = self . current_hir_id_owner . def_id ;
2073
2071
let node_id = self . next_node_id ( ) ;
2074
2072
let span = self . lower_span ( span) ;
2075
2073
2076
2074
// Add a definition for the in-band const def.
2077
2075
// We're lowering a const argument that was originally thought to be a type argument,
2078
2076
// so the def collector didn't create the def ahead of time. That's why we have to do
2079
2077
// it here.
2080
- let def_id = self . create_def ( parent_def_id , node_id, None , DefKind :: AnonConst , span) ;
2078
+ let def_id = self . create_def ( node_id, None , DefKind :: AnonConst , span) ;
2081
2079
let hir_id = self . lower_node_id ( node_id) ;
2082
2080
2083
2081
let path_expr = Expr {
0 commit comments