@@ -159,11 +159,11 @@ pub macro run_passes(
159159 $tcx: ident,
160160 $mir: ident,
161161 $def_id: ident,
162- $suite_index: expr,
163162 $mir_phase: expr;
164163 $( $pass: expr, ) *
165164) { {
166- let suite_index: usize = $suite_index;
165+ let phase_index = $mir_phase. phase_index ( ) ;
166+
167167 let run_passes = |mir : & mut _ , promoted| {
168168 let mir: & mut Mir < ' _ > = mir;
169169
@@ -178,7 +178,7 @@ pub macro run_passes(
178178 let mut index = 0 ;
179179 let mut run_pass = |pass : & dyn MirPass | {
180180 let run_hooks = |mir : & _ , index, is_after| {
181- dump_mir:: on_mir_pass ( $tcx, & format_args ! ( "{:03}-{:03}" , suite_index , index) ,
181+ dump_mir:: on_mir_pass ( $tcx, & format_args ! ( "{:03}-{:03}" , phase_index , index) ,
182182 & pass. name ( ) , source, mir, is_after) ;
183183 } ;
184184 run_hooks ( mir, index, false ) ;
@@ -207,7 +207,7 @@ fn mir_const<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx Stea
207207 let _ = tcx. unsafety_check_result ( def_id) ;
208208
209209 let mut mir = tcx. mir_built ( def_id) . steal ( ) ;
210- run_passes ! [ tcx, mir, def_id, 0 , MirPhase :: Const ;
210+ run_passes ! [ tcx, mir, def_id, MirPhase :: Const ;
211211 // Remove all `EndRegion` statements that are not involved in borrows.
212212 cleanup_post_borrowck:: CleanEndRegions ,
213213
@@ -229,7 +229,7 @@ fn mir_validated<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx
229229 }
230230
231231 let mut mir = tcx. mir_const ( def_id) . steal ( ) ;
232- run_passes ! [ tcx, mir, def_id, 1 , MirPhase :: Validated ;
232+ run_passes ! [ tcx, mir, def_id, MirPhase :: Validated ;
233233 // What we need to run borrowck etc.
234234 qualify_consts:: QualifyAndPromoteConstants ,
235235 simplify:: SimplifyCfg :: new( "qualify-consts" ) ,
@@ -247,7 +247,7 @@ fn optimized_mir<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: DefId) -> &'tcx
247247 }
248248
249249 let mut mir = tcx. mir_validated ( def_id) . steal ( ) ;
250- run_passes ! [ tcx, mir, def_id, 2 , MirPhase :: Optimized ;
250+ run_passes ! [ tcx, mir, def_id, MirPhase :: Optimized ;
251251 // Remove all things not needed by analysis
252252 no_landing_pads:: NoLandingPads ,
253253 simplify_branches:: SimplifyBranches :: new( "initial" ) ,
0 commit comments