@@ -1156,7 +1156,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11561156 None ,
11571157 ) ;
11581158 return GenericArg :: Const ( ConstArg {
1159- hir_id : self . lower_node_id ( ty . id ) ,
1159+ hir_id : self . next_id ( ) ,
11601160 kind : ConstArgKind :: Path ( qpath) ,
11611161 is_desugared_from_effects : false ,
11621162 } ) ;
@@ -1189,15 +1189,15 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11891189 None ,
11901190 ) ;
11911191 return ConstArg {
1192- hir_id : self . lower_node_id ( anon . id ) ,
1192+ hir_id : self . next_id ( ) ,
11931193 kind : ConstArgKind :: Path ( qpath) ,
11941194 is_desugared_from_effects : false ,
11951195 } ;
11961196 }
11971197
11981198 let lowered_anon = self . lower_anon_const ( anon) ;
11991199 ConstArg {
1200- hir_id : lowered_anon . hir_id ,
1200+ hir_id : self . next_id ( ) ,
12011201 kind : ConstArgKind :: Anon ( lowered_anon) ,
12021202 is_desugared_from_effects : false ,
12031203 }
@@ -2597,7 +2597,7 @@ impl<'hir> GenericArgsCtor<'hir> {
25972597 return ;
25982598 }
25992599
2600- let ( hir_id , const_arg_kind) = match constness {
2600+ let const_arg_kind = match constness {
26012601 BoundConstness :: Never => return ,
26022602 BoundConstness :: Always ( span) => {
26032603 let id = lcx. next_node_id ( ) ;
@@ -2618,18 +2618,14 @@ impl<'hir> GenericArgsCtor<'hir> {
26182618 ) ;
26192619
26202620 lcx. children . push ( ( def_id, hir:: MaybeOwner :: NonOwner ( hir_id) ) ) ;
2621- (
2621+ hir:: ConstArgKind :: Anon ( lcx. arena . alloc ( hir:: AnonConst {
2622+ def_id,
26222623 hir_id,
2623- hir:: ConstArgKind :: Anon ( lcx. arena . alloc ( hir:: AnonConst {
2624- def_id,
2625- hir_id,
2626- body,
2627- span,
2628- } ) ) ,
2629- )
2624+ body,
2625+ span,
2626+ } ) )
26302627 }
26312628 BoundConstness :: Maybe ( span) => {
2632- let hir_id = lcx. next_id ( ) ;
26332629 let span = lcx. lower_span ( span) ;
26342630
26352631 let Some ( host_param_id) = lcx. host_param_id else {
@@ -2641,6 +2637,7 @@ impl<'hir> GenericArgsCtor<'hir> {
26412637 } ;
26422638
26432639 let res = Res :: Def ( DefKind :: ConstParam , host_param_id. to_def_id ( ) ) ;
2640+ let hir_id = lcx. next_id ( ) ;
26442641 let path = lcx. arena . alloc ( hir:: Path {
26452642 span,
26462643 res,
@@ -2653,12 +2650,12 @@ impl<'hir> GenericArgsCtor<'hir> {
26532650 )
26542651 ] ,
26552652 } ) ;
2656- ( hir_id , hir:: ConstArgKind :: Path ( hir:: QPath :: Resolved ( None , path) ) )
2653+ hir:: ConstArgKind :: Path ( hir:: QPath :: Resolved ( None , path) )
26572654 }
26582655 } ;
26592656
26602657 self . args . push ( hir:: GenericArg :: Const ( hir:: ConstArg {
2661- hir_id,
2658+ hir_id : lcx . next_id ( ) ,
26622659 kind : const_arg_kind,
26632660 is_desugared_from_effects : true ,
26642661 } ) )
0 commit comments