@@ -445,7 +445,7 @@ fn do_resolve(
445
445
trait_definition_only : bool ,
446
446
with_scope_for_path : bool ,
447
447
) -> 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) ;
449
449
let mut named_region_map = NamedRegionMap {
450
450
defs : Default :: default ( ) ,
451
451
late_bound : Default :: default ( ) ,
@@ -1134,7 +1134,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
1134
1134
self . missing_named_lifetime_spots . push ( ( & trait_item. generics ) . into ( ) ) ;
1135
1135
let tcx = self . tcx ;
1136
1136
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 ( ) ) ) ,
1138
1138
trait_item. hir_id ( ) ,
1139
1139
& sig. decl ,
1140
1140
& trait_item. generics ,
@@ -1203,7 +1203,7 @@ impl<'a, 'tcx> Visitor<'tcx> for LifetimeContext<'a, 'tcx> {
1203
1203
self . missing_named_lifetime_spots . push ( ( & impl_item. generics ) . into ( ) ) ;
1204
1204
let tcx = self . tcx ;
1205
1205
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 ( ) ) ) ,
1207
1207
impl_item. hir_id ( ) ,
1208
1208
& sig. decl ,
1209
1209
& impl_item. generics ,
@@ -2176,7 +2176,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
2176
2176
/// ordering is not important there.
2177
2177
fn visit_early_late < F > (
2178
2178
& mut self ,
2179
- parent_id : Option < hir :: HirId > ,
2179
+ parent_id : Option < LocalDefId > ,
2180
2180
hir_id : hir:: HirId ,
2181
2181
decl : & ' tcx hir:: FnDecl < ' tcx > ,
2182
2182
generics : & ' tcx hir:: Generics < ' tcx > ,
@@ -2758,7 +2758,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
2758
2758
2759
2759
Node :: TraitItem ( & hir:: TraitItem { kind : hir:: TraitItemKind :: Fn ( _, ref m) , .. } ) => {
2760
2760
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
2762
2762
{
2763
2763
assoc_item_kind =
2764
2764
trait_items. iter ( ) . find ( |ti| ti. id . hir_id ( ) == parent) . map ( |ti| ti. kind ) ;
@@ -2771,7 +2771,7 @@ impl<'a, 'tcx> LifetimeContext<'a, 'tcx> {
2771
2771
2772
2772
Node :: ImplItem ( & hir:: ImplItem { kind : hir:: ImplItemKind :: Fn ( _, body) , .. } ) => {
2773
2773
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
2775
2775
{
2776
2776
impl_self = Some ( self_ty) ;
2777
2777
assoc_item_kind =
0 commit comments