4 use rustc_middle::mir::{Body, MirPhase};
5 use rustc_middle::ty::TyCtxt;
7 /// Changes the MIR phase without changing the MIR itself.
8 pub struct PhaseChange(pub MirPhase);
10 impl<'tcx> MirPass<'tcx> for PhaseChange {
11 fn phase_change(&self) -> Option<MirPhase> {
15 fn name(&self) -> Cow<'_, str> {
16 Cow::from(format!("PhaseChange-{:?}", self.0))
19 fn run_pass(&self, _: TyCtxt<'tcx>, _body: &mut Body<'tcx>) {}