diff options
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/assoc.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/opaque_types.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/assoc.rs b/compiler/rustc_ty_utils/src/assoc.rs index a1ebf386e74..612123e7901 100644 --- a/compiler/rustc_ty_utils/src/assoc.rs +++ b/compiler/rustc_ty_utils/src/assoc.rs @@ -94,7 +94,7 @@ fn impl_item_implementor_ids(tcx: TyCtxt<'_>, impl_id: DefId) -> DefIdMap<DefId> } fn associated_item(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::AssocItem { - let id = tcx.hir().local_def_id_to_hir_id(def_id); + let id = tcx.local_def_id_to_hir_id(def_id); let parent_def_id = tcx.hir().get_parent_item(id); let parent_item = tcx.hir().expect_item(parent_def_id.def_id); match parent_item.kind { diff --git a/compiler/rustc_ty_utils/src/opaque_types.rs b/compiler/rustc_ty_utils/src/opaque_types.rs index 7ca2da42042..c17970e23a2 100644 --- a/compiler/rustc_ty_utils/src/opaque_types.rs +++ b/compiler/rustc_ty_utils/src/opaque_types.rs @@ -81,8 +81,8 @@ impl<'tcx> OpaqueTypeCollector<'tcx> { /// For the above example, this function returns `true` for `f1` and `false` for `f2`. #[instrument(level = "trace", skip(self), ret)] fn check_tait_defining_scope(&self, opaque_def_id: LocalDefId) -> bool { - let mut hir_id = self.tcx.hir().local_def_id_to_hir_id(self.item); - let opaque_hir_id = self.tcx.hir().local_def_id_to_hir_id(opaque_def_id); + let mut hir_id = self.tcx.local_def_id_to_hir_id(self.item); + let opaque_hir_id = self.tcx.local_def_id_to_hir_id(opaque_def_id); // Named opaque types can be defined by any siblings or children of siblings. let scope = self.tcx.hir().get_defining_scope(opaque_hir_id); |
