@@ -28,7 +28,7 @@ pub(super) fn opt_const_param_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<
28
28
_ => return None ,
29
29
} ;
30
30
31
- let parent_node_id = tcx. hir ( ) . get_parent_node ( hir_id) ;
31
+ let parent_node_id = tcx. hir ( ) . parent_id ( hir_id) ;
32
32
let parent_node = tcx. hir ( ) . get ( parent_node_id) ;
33
33
34
34
let ( generics, arg_idx) = match parent_node {
@@ -402,7 +402,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
402
402
}
403
403
404
404
Node :: AnonConst ( _) => {
405
- let parent_node = tcx. hir ( ) . get ( tcx. hir ( ) . get_parent_node ( hir_id) ) ;
405
+ let parent_node = tcx. hir ( ) . get ( tcx. hir ( ) . parent_id ( hir_id) ) ;
406
406
match parent_node {
407
407
Node :: Ty ( & Ty { kind : TyKind :: Array ( _, ref constant) , .. } )
408
408
| Node :: Expr ( & Expr { kind : ExprKind :: Repeat ( _, ref constant) , .. } )
@@ -445,7 +445,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
445
445
..
446
446
} ,
447
447
) if let Node :: TraitRef ( trait_ref) =
448
- tcx. hir ( ) . get ( tcx. hir ( ) . get_parent_node ( binding_id) )
448
+ tcx. hir ( ) . get ( tcx. hir ( ) . parent_id ( binding_id) )
449
449
&& e. hir_id == hir_id =>
450
450
{
451
451
let Some ( trait_def_id) = trait_ref. trait_def_id ( ) else {
@@ -472,7 +472,7 @@ pub(super) fn type_of(tcx: TyCtxt<'_>, def_id: DefId) -> Ty<'_> {
472
472
Node :: TypeBinding (
473
473
binding @ & TypeBinding { hir_id : binding_id, gen_args, ref kind, .. } ,
474
474
) if let Node :: TraitRef ( trait_ref) =
475
- tcx. hir ( ) . get ( tcx. hir ( ) . get_parent_node ( binding_id) )
475
+ tcx. hir ( ) . get ( tcx. hir ( ) . parent_id ( binding_id) )
476
476
&& let Some ( ( idx, _) ) =
477
477
gen_args. args . iter ( ) . enumerate ( ) . find ( |( _, arg) | {
478
478
if let GenericArg :: Const ( ct) = arg {
0 commit comments