@@ -432,7 +432,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
432432 ty:: Const :: from_opt_const_arg_anon_const (
433433 tcx,
434434 ty:: WithOptConstParam {
435- did : tcx . hir ( ) . local_def_id ( ct. value . hir_id ) ,
435+ did : ct. value . def_id ,
436436 const_param_did : Some ( param. def_id ) ,
437437 } ,
438438 )
@@ -570,8 +570,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
570570 ConvertedBindingKind :: Equality ( self . ast_ty_to_ty ( ty) . into ( ) )
571571 }
572572 hir:: Term :: Const ( ref c) => {
573- let local_did = self . tcx ( ) . hir ( ) . local_def_id ( c. hir_id ) ;
574- let c = Const :: from_anon_const ( self . tcx ( ) , local_did) ;
573+ let c = Const :: from_anon_const ( self . tcx ( ) , c. def_id ) ;
575574 ConvertedBindingKind :: Equality ( c. into ( ) )
576575 }
577576 } ,
@@ -2712,16 +2711,15 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
27122711 let length = match length {
27132712 & hir:: ArrayLen :: Infer ( _, span) => self . ct_infer ( tcx. types . usize , None , span) ,
27142713 hir:: ArrayLen :: Body ( constant) => {
2715- let length_def_id = tcx. hir ( ) . local_def_id ( constant. hir_id ) ;
2716- ty:: Const :: from_anon_const ( tcx, length_def_id)
2714+ ty:: Const :: from_anon_const ( tcx, constant. def_id )
27172715 }
27182716 } ;
27192717
27202718 let array_ty = tcx. mk_ty ( ty:: Array ( self . ast_ty_to_ty ( ty) , length) ) ;
27212719 self . normalize_ty ( ast_ty. span , array_ty)
27222720 }
27232721 hir:: TyKind :: Typeof ( ref e) => {
2724- let ty_erased = tcx. type_of ( tcx . hir ( ) . local_def_id ( e . hir_id ) ) ;
2722+ let ty_erased = tcx. type_of ( e . def_id ) ;
27252723 let ty = tcx. fold_regions ( ty_erased, |r, _| {
27262724 if r. is_erased ( ) { tcx. lifetimes . re_static } else { r }
27272725 } ) ;
0 commit comments