Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 08de246

Browse files
committed
Move CtfeLimit to mir_const's set of passes
1 parent 80a3d2a commit 08de246

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,6 +610,7 @@ 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
613614
| StatementKind::StorageLive(..) => {}
614615
StatementKind::StorageDead(local) => {
615616
self.access_place(
@@ -620,8 +621,7 @@ impl<'cx, 'tcx> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx> for MirBorrowckCtx
620621
flow_state,
621622
);
622623
}
623-
StatementKind::ConstEvalCounter
624-
| StatementKind::Nop
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,6 +299,7 @@ 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,
302303
],
303304
None,
304305
);
@@ -518,7 +519,6 @@ fn run_runtime_lowering_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
518519
// CTFE support for aggregates.
519520
&deaggregator::Deaggregator,
520521
&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)