diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-11-24 19:28:19 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2023-11-26 12:41:21 +0300 |
| commit | c697927f443043fb9715b9b239fa1d2440c0e53c (patch) | |
| tree | bf4639a340a229b2940d78a6ffd226c4a4f1ff1a /compiler/rustc_ty_utils | |
| parent | 9529a5d2655f6974c2ee16e91c5db548a3daea03 (diff) | |
| download | rust-c697927f443043fb9715b9b239fa1d2440c0e53c.tar.gz rust-c697927f443043fb9715b9b239fa1d2440c0e53c.zip | |
rustc: `hir().local_def_id_to_hir_id()` -> `tcx.local_def_id_to_hir_id()` cleanup
Diffstat (limited to 'compiler/rustc_ty_utils')
| -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); |
