Revert "Cache whether a body has inline consts"

This reverts commit eae5031ecb.
This commit is contained in:
Oli Scherer 2024-06-03 08:38:40 +00:00
parent b74702fbb2
commit 92c54db22f
6 changed files with 4 additions and 22 deletions

View file

@ -225,11 +225,7 @@ fn mir_keys(tcx: TyCtxt<'_>, (): ()) -> FxIndexSet<LocalDefId> {
// Inline consts' bodies are created in
// typeck instead of during ast lowering, like all other bodies so far.
for def_id in tcx.hir().body_owners() {
// Incremental performance optimization: only load typeck results for things that actually have inline consts
if tcx.hir_owner_nodes(tcx.hir().body_owned_by(def_id).id().hir_id.owner).has_inline_consts
{
set.extend(tcx.typeck(def_id).inline_consts.values())
}
set.extend(tcx.typeck(def_id).inline_consts.values())
}
// Additionally, tuple struct/variant constructors have MIR, but