File tree 2 files changed +21
-0
lines changed
compiler/rustc_mir_transform/src
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ mod inline;
61
61
mod instcombine;
62
62
mod lower_intrinsics;
63
63
mod lower_slice_len;
64
+ mod marker;
64
65
mod match_branches;
65
66
mod multiple_return_terminators;
66
67
mod 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