1
Fork 0

Remove HirId -> LocalDefId map from HIR.

This commit is contained in:
Camille GILLOT 2022-11-05 15:33:58 +00:00
parent 3175d03d3b
commit 15d6325747
46 changed files with 321 additions and 382 deletions

View file

@ -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())