File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
compiler/rustc_mir_transform/src Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ mod inline;
6161mod instcombine;
6262mod lower_intrinsics;
6363mod lower_slice_len;
64+ mod marker;
6465mod match_branches;
6566mod multiple_return_terminators;
6667mod normalize_array_len;
Original file line number Diff line number Diff line change 1+ use std:: borrow:: Cow ;
2+
3+ use crate :: MirPass ;
4+ use rustc_middle:: mir:: { Body , MirPhase } ;
5+ use rustc_middle:: ty:: TyCtxt ;
6+
7+ /// Changes the MIR phase without changing the MIR itself.
8+ pub struct PhaseChange ( pub MirPhase ) ;
9+
10+ impl < ' tcx > MirPass < ' tcx > for PhaseChange {
11+ fn phase_change ( & self ) -> Option < MirPhase > {
12+ Some ( self . 0 )
13+ }
14+
15+ fn name ( & self ) -> Cow < ' _ , str > {
16+ Cow :: from ( format ! ( "PhaseChange-{:?}" , self . 0 ) )
17+ }
18+
19+ fn run_pass ( & self , _: TyCtxt < ' tcx > , _body : & mut Body < ' tcx > ) { }
20+ }
You can’t perform that action at this time.
0 commit comments