Skip to content

Commit d3c13a0

Browse files
committed
Revert "Move CtfeLimit to mir_const's set of passes"
This reverts commit 332542a92223b2800ed372d2d461921147f29477.
1 parent 172662d commit d3c13a0

File tree

2 files changed

+3
-3
lines changed
  • compiler

2 files changed

+3
-3
lines changed

compiler/rustc_borrowck/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,6 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
610610
// Doesn't have any language semantics
611611
| StatementKind::Coverage(..)
612612
// Does not actually affect borrowck
613-
| StatementKind::ConstEvalCounter
614613
| StatementKind::StorageLive(..) => {}
615614
StatementKind::StorageDead(local) => {
616615
self.access_place(
@@ -621,7 +620,8 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
621620
flow_state,
622621
);
623622
}
624-
StatementKind::Nop
623+
StatementKind::ConstEvalCounter
624+
| StatementKind::Nop
625625
| StatementKind::Retag { .. }
626626
| StatementKind::Deinit(..)
627627
| StatementKind::SetDiscriminant { .. } => {

compiler/rustc_mir_transform/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ fn mir_const(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> &Steal<
299299
// What we need to do constant evaluation.
300300
&simplify::SimplifyCfg::new("initial"),
301301
&rustc_peek::SanityCheck, // Just a lint
302-
&ctfe_limit::CtfeLimit,
303302
],
304303
None,
305304
);
@@ -519,6 +518,7 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
519518
// CTFE support for aggregates.
520519
&deaggregator::Deaggregator,
521520
&Lint(const_prop_lint::ConstProp),
521+
&ctfe_limit::CtfeLimit,
522522
];
523523
pm::run_passes_no_validate(tcx, body, passes, Some(MirPhase::Runtime(RuntimePhase::Initial)));
524524
}

0 commit comments

Comments
 (0)