Use the HIR instead of mir_keys for determining whether something will have a MIR body.

This commit is contained in:
Oli Scherer 2024-05-24 09:37:57 +00:00
parent 53e3c3271f
commit e5cba17b84

View File

@ -211,7 +211,7 @@ fn remap_mir_for_const_eval_select<'tcx>(
}
fn is_mir_available(tcx: TyCtxt<'_>, def_id: LocalDefId) -> bool {
tcx.mir_keys(()).contains(&def_id)
tcx.hir().maybe_body_owned_by(def_id).is_some()
}
/// Finds the full set of `DefId`s within the current crate that have