Skip to content

Commit 999d19d

Browse files
committed
Move CtfeLimit MirPass to inner_mir_for_ctfe
1 parent d3c13a0 commit 999d19d

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+2
-1
lines changed

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ fn inner_mir_for_ctfe(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -
411411
}
412412
}
413413

414+
pm::run_passes(tcx, &mut body, &[&ctfe_limit::CtfeLimit], None);
415+
414416
debug_assert!(!body.has_free_regions(), "Free regions in MIR for CTFE");
415417

416418
body
@@ -518,7 +520,6 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
518520
// CTFE support for aggregates.
519521
&deaggregator::Deaggregator,
520522
&Lint(const_prop_lint::ConstProp),
521-
&ctfe_limit::CtfeLimit,
522523
];
523524
pm::run_passes_no_validate(tcx, body, passes, Some(MirPhase::Runtime(RuntimePhase::Initial)));
524525
}

0 commit comments

Comments
 (0)