Skip to content

Commit

Permalink
Use the HIR instead of mir_keys for determining whether something wil…
Browse files Browse the repository at this point in the history
…l have a MIR body.
  • Loading branch information
oli-obk committed May 28, 2024
1 parent 53e3c32 commit e5cba17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_mir_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5cba17

Please sign in to comment.