We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d06ca0f commit 4170ca4Copy full SHA for 4170ca4
compiler/rustc_mir_build/src/build/mod.rs
@@ -56,7 +56,8 @@ pub(crate) fn closure_saved_names_of_captured_variables<'tcx>(
56
/// Construct the MIR for a given `DefId`.
57
fn mir_build(tcx: TyCtxt<'_>, def: LocalDefId) -> Body<'_> {
58
// Ensure unsafeck and abstract const building is ran before we steal the THIR.
59
- tcx.ensure_with_value().thir_check_unsafety(def);
+ tcx.ensure_with_value()
60
+ .thir_check_unsafety(tcx.typeck_root_def_id(def.to_def_id()).expect_local());
61
tcx.ensure_with_value().thir_abstract_const(def);
62
if let Err(e) = tcx.check_match(def) {
63
return construct_error(tcx, def, e);
0 commit comments