@@ -495,7 +495,6 @@ enum GenericArgsMode {
495
495
impl < ' a , ' hir > LoweringContext < ' a , ' hir > {
496
496
fn create_def (
497
497
& mut self ,
498
- parent : LocalDefId ,
499
498
node_id : ast:: NodeId ,
500
499
name : Option < Symbol > ,
501
500
def_kind : DefKind ,
@@ -510,7 +509,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
510
509
self . tcx. hir_def_key( self . local_def_id( node_id) ) ,
511
510
) ;
512
511
513
- let def_id = self . tcx . at ( span) . create_def ( parent, name, def_kind) . def_id ( ) ;
512
+ let def_id =
513
+ self . tcx . at ( span) . create_def ( self . current_hir_id_owner . def_id , name, def_kind) . def_id ( ) ;
514
514
515
515
debug ! ( "create_def: def_id_to_node_id[{:?}] <-> {:?}" , def_id, node_id) ;
516
516
self . resolver . node_id_to_def_id . insert ( node_id, def_id) ;
@@ -782,7 +782,6 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
782
782
LifetimeRes :: Fresh { param, kind, .. } => {
783
783
// Late resolution delegates to us the creation of the `LocalDefId`.
784
784
let _def_id = self . create_def (
785
- self . current_hir_id_owner . def_id ,
786
785
param,
787
786
Some ( kw:: UnderscoreLifetime ) ,
788
787
DefKind :: LifetimeParam ,
@@ -2086,15 +2085,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
2086
2085
} else {
2087
2086
// Construct an AnonConst where the expr is the "ty"'s path.
2088
2087
2089
- let parent_def_id = self . current_hir_id_owner . def_id ;
2090
2088
let node_id = self . next_node_id ( ) ;
2091
2089
let span = self . lower_span ( span) ;
2092
2090
2093
2091
// Add a definition for the in-band const def.
2094
2092
// We're lowering a const argument that was originally thought to be a type argument,
2095
2093
// so the def collector didn't create the def ahead of time. That's why we have to do
2096
2094
// it here.
2097
- let def_id = self . create_def ( parent_def_id , node_id, None , DefKind :: AnonConst , span) ;
2095
+ let def_id = self . create_def ( node_id, None , DefKind :: AnonConst , span) ;
2098
2096
let hir_id = self . lower_node_id ( node_id) ;
2099
2097
2100
2098
let path_expr = Expr {
0 commit comments