diff options
| author | bors <bors@rust-lang.org> | 2023-01-28 16:11:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-28 16:11:33 +0000 |
| commit | d6f0642827e21a088b0130c84857d84f5433301d (patch) | |
| tree | 9d109467a036373273b6166d41cc5bd855618a02 /compiler/rustc_middle/src/mir/mod.rs | |
| parent | bca8b4dc32ec20f9a4e0ca55f54e5b2a531936fc (diff) | |
| parent | 1aab86eae2f9e3e442f39577bd1bd62bccd8cc0c (diff) | |
| download | rust-d6f0642827e21a088b0130c84857d84f5433301d.tar.gz rust-d6f0642827e21a088b0130c84857d84f5433301d.zip | |
Auto merge of #107206 - cjgillot:no-h2l-map, r=WaffleLapkin
Remove HirId -> LocalDefId map from HIR. Having this map in HIR prevents the creating of new definitions after HIR has been built. Thankfully, we do not need it. Based on https://github.com/rust-lang/rust/pull/103902
Diffstat (limited to 'compiler/rustc_middle/src/mir/mod.rs')
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 63b8dd055bd..bc3c38fdb1c 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -2506,7 +2506,7 @@ impl<'tcx> ConstantKind<'tcx> { let hir_id = tcx.hir().local_def_id_to_hir_id(def.did); let parent_substs = if let Some(parent_hir_id) = tcx.hir().opt_parent_id(hir_id) { - if let Some(parent_did) = tcx.hir().opt_local_def_id(parent_hir_id) { + if let Some(parent_did) = parent_hir_id.as_owner() { InternalSubsts::identity_for_item(tcx, parent_did.to_def_id()) } else { tcx.mk_substs(Vec::<GenericArg<'tcx>>::new().into_iter()) |
