@@ -494,12 +494,12 @@ 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 ,
501
500
span : Span ,
502
501
) -> LocalDefId {
502
+ let parent = self . current_hir_id_owner . def_id ;
503
503
debug_assert_ne ! ( node_id, ast:: DUMMY_NODE_ID ) ;
504
504
assert ! (
505
505
self . opt_local_def_id( node_id) . is_none( ) ,
@@ -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 ,
@@ -2107,16 +2106,14 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
2107
2106
hir:: ConstArgKind :: Path ( qpath)
2108
2107
} else {
2109
2108
// Construct an AnonConst where the expr is the "ty"'s path.
2110
-
2111
- let parent_def_id = self . current_hir_id_owner . def_id ;
2112
2109
let node_id = self . next_node_id ( ) ;
2113
2110
let span = self . lower_span ( span) ;
2114
2111
2115
2112
// Add a definition for the in-band const def.
2116
2113
// We're lowering a const argument that was originally thought to be a type argument,
2117
2114
// so the def collector didn't create the def ahead of time. That's why we have to do
2118
2115
// it here.
2119
- let def_id = self . create_def ( parent_def_id , node_id, None , DefKind :: AnonConst , span) ;
2116
+ let def_id = self . create_def ( node_id, None , DefKind :: AnonConst , span) ;
2120
2117
let hir_id = self . lower_node_id ( node_id) ;
2121
2118
2122
2119
let path_expr = Expr {
0 commit comments