@@ -454,7 +454,7 @@ fn convert_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, item_id: hir::HirId) {
454454 }
455455
456456 if !struct_def. is_struct ( ) {
457- convert_variant_ctor ( tcx, struct_def. id ( ) ) ;
457+ convert_variant_ctor ( tcx, struct_def. hir_id ( ) ) ;
458458 }
459459 }
460460
@@ -510,8 +510,8 @@ fn convert_impl_item<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, impl_item_id: hir::H
510510 }
511511}
512512
513- fn convert_variant_ctor < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , ctor_id : ast :: NodeId ) {
514- let def_id = tcx. hir ( ) . local_def_id ( ctor_id) ;
513+ fn convert_variant_ctor < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , ctor_id : hir :: HirId ) {
514+ let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( ctor_id) ;
515515 tcx. generics_of ( def_id) ;
516516 tcx. type_of ( def_id) ;
517517 tcx. predicates_of ( def_id) ;
@@ -563,7 +563,7 @@ fn convert_enum_variant_types<'a, 'tcx>(
563563
564564 // Convert the ctor, if any. This also registers the variant as
565565 // an item.
566- convert_variant_ctor ( tcx, variant. node . data . id ( ) ) ;
566+ convert_variant_ctor ( tcx, variant. node . data . hir_id ( ) ) ;
567567 }
568568}
569569
@@ -634,7 +634,7 @@ fn adt_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx ty::Ad
634634 def. variants
635635 . iter ( )
636636 . map ( |v| {
637- let did = tcx. hir ( ) . local_def_id ( v. node . data . id ( ) ) ;
637+ let did = tcx. hir ( ) . local_def_id_from_hir_id ( v. node . data . hir_id ( ) ) ;
638638 let discr = if let Some ( ref e) = v. node . disr_expr {
639639 distance_from_explicit = 0 ;
640640 ty:: VariantDiscr :: Explicit ( tcx. hir ( ) . local_def_id_from_hir_id ( e. hir_id ) )
@@ -652,7 +652,7 @@ fn adt_def<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx ty::Ad
652652 ItemKind :: Struct ( ref def, _) => {
653653 // Use separate constructor id for unit/tuple structs and reuse did for braced structs.
654654 let ctor_id = if !def. is_struct ( ) {
655- Some ( tcx. hir ( ) . local_def_id ( def. id ( ) ) )
655+ Some ( tcx. hir ( ) . local_def_id_from_hir_id ( def. hir_id ( ) ) )
656656 } else {
657657 None
658658 } ;
0 commit comments