@@ -445,7 +445,7 @@ fn do_resolve(
445445 trait_definition_only : bool ,
446446 with_scope_for_path : bool ,
447447) -> NamedRegionMap {
448- let item = tcx. hir ( ) . expect_item ( tcx . hir ( ) . local_def_id_to_hir_id ( local_def_id) ) ;
448+ let item = tcx. hir ( ) . expect_item ( local_def_id) ;
449449 let mut named_region_map = NamedRegionMap {
450450 defs : Default :: default ( ) ,
451451 late_bound : Default :: default ( ) ,
@@ -1134,7 +1134,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
11341134 self . missing_named_lifetime_spots . push ( ( & trait_item. generics ) . into ( ) ) ;
11351135 let tcx = self . tcx ;
11361136 self . visit_early_late (
1137- Some ( tcx. hir ( ) . get_parent_item ( trait_item. hir_id ( ) ) ) ,
1137+ Some ( tcx. hir ( ) . get_parent_did ( trait_item. hir_id ( ) ) ) ,
11381138 trait_item. hir_id ( ) ,
11391139 & sig. decl ,
11401140 & trait_item. generics ,
@@ -1203,7 +1203,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
12031203 self . missing_named_lifetime_spots . push ( ( & impl_item. generics ) . into ( ) ) ;
12041204 let tcx = self . tcx ;
12051205 self . visit_early_late (
1206- Some ( tcx. hir ( ) . get_parent_item ( impl_item. hir_id ( ) ) ) ,
1206+ Some ( tcx. hir ( ) . get_parent_did ( impl_item. hir_id ( ) ) ) ,
12071207 impl_item. hir_id ( ) ,
12081208 & sig. decl ,
12091209 & impl_item. generics ,
@@ -2176,7 +2176,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
21762176 /// ordering is not important there.
21772177 fn visit_early_late < F > (
21782178 & mut self ,
2179- parent_id : Option < hir :: HirId > ,
2179+ parent_id : Option < LocalDefId > ,
21802180 hir_id : hir:: HirId ,
21812181 decl : & ' tcx hir:: FnDecl < ' tcx > ,
21822182 generics : & ' tcx hir:: Generics < ' tcx > ,
@@ -2758,7 +2758,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
27582758
27592759 Node :: TraitItem ( & hir:: TraitItem { kind : hir:: TraitItemKind :: Fn ( _, ref m) , .. } ) => {
27602760 if let hir:: ItemKind :: Trait ( .., ref trait_items) =
2761- self . tcx . hir ( ) . expect_item ( self . tcx . hir ( ) . get_parent_item ( parent) ) . kind
2761+ self . tcx . hir ( ) . expect_item ( self . tcx . hir ( ) . get_parent_did ( parent) ) . kind
27622762 {
27632763 assoc_item_kind =
27642764 trait_items. iter ( ) . find ( |ti| ti. id . hir_id ( ) == parent) . map ( |ti| ti. kind ) ;
@@ -2771,7 +2771,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
27712771
27722772 Node :: ImplItem ( & hir:: ImplItem { kind : hir:: ImplItemKind :: Fn ( _, body) , .. } ) => {
27732773 if let hir:: ItemKind :: Impl ( hir:: Impl { ref self_ty, ref items, .. } ) =
2774- self . tcx . hir ( ) . expect_item ( self . tcx . hir ( ) . get_parent_item ( parent) ) . kind
2774+ self . tcx . hir ( ) . expect_item ( self . tcx . hir ( ) . get_parent_did ( parent) ) . kind
27752775 {
27762776 impl_self = Some ( self_ty) ;
27772777 assoc_item_kind =
0 commit comments