From c4c4c566d080ccd7511ce6151ef5f7a6ed39522f Mon Sep 17 00:00:00 2001
From: Jakob Degen <jakob.e.degen@gmail.com>
Date: Sun, 4 Sep 2022 20:00:31 -0700
Subject: [PATCH 1/2] Replace `mir_map.0` dump with `built` phase change dump

---
 compiler/rustc_mir_transform/src/lib.rs       |  2 +-
 compiler/rustc_mir_transform/src/shim.rs      |  2 +-
 ...e_edges.full_tested_match.built.after.mir} | 29 ++++----
 ..._edges.full_tested_match2.built.after.mir} | 22 +++---
 .../match_false_edges.main.built.after.mir}   | 73 ++++++++++++-------
 .../{ => building}/match_false_edges.rs       |  6 +-
 .../mir-opt/const-promotion-extern-static.rs  |  2 +-
 ...omotion_extern_static.BOP.built.after.mir} |  2 +-
 ...ap.0.mir => enum_cast.bar.built.after.mir} |  2 +-
 ...ap.0.mir => enum_cast.boo.built.after.mir} |  2 +-
 ...0.mir => enum_cast.droppy.built.after.mir} |  2 +-
 ...ap.0.mir => enum_cast.foo.built.after.mir} |  2 +-
 src/test/mir-opt/enum_cast.rs                 |  8 +-
 ...ap.0.dot => graphviz.main.built.after.dot} |  0
 src/test/mir-opt/graphviz.rs                  |  2 +-
 src/test/mir-opt/issue-101867.rs              |  2 +-
 src/test/mir-opt/issue-49232.rs               |  2 +-
 src/test/mir-opt/issue-72181-1.rs             |  4 +-
 src/test/mir-opt/issue-72181.rs               |  6 +-
 src/test/mir-opt/issue-91633.rs               |  8 +-
 src/test/mir-opt/issue-99325.rs               |  2 +-
 ....mir => issue_101867.main.built.after.mir} |  2 +-
 ...0.mir => issue_49232.main.built.after.mir} |  2 +-
 ....0.mir => issue_72181.bar.built.after.mir} |  2 +-
 ....0.mir => issue_72181.foo.built.after.mir} |  2 +-
 ...0.mir => issue_72181.main.built.after.mir} |  2 +-
 ....0.mir => issue_72181_1.f.built.after.mir} |  2 +-
 ...mir => issue_72181_1.main.built.after.mir} |  2 +-
 ....0.mir => issue_91633.bar.built.after.mir} |  2 +-
 ....0.mir => issue_91633.foo.built.after.mir} |  2 +-
 ....0.mir => issue_91633.fun.built.after.mir} |  2 +-
 ....0.mir => issue_91633.hey.built.after.mir} |  2 +-
 ...0.mir => issue_99325.main.built.after.mir} |  2 +-
 src/test/mir-opt/receiver-ptr-mutability.rs   |  2 +-
 ...eiver_ptr_mutability.main.built.after.mir} |  2 +-
 src/test/mir-opt/simple-match.rs              |  2 +-
 ...> simple_match.match_bool.built.after.mir} |  2 +-
 src/test/mir-opt/spanview-block.rs            |  2 +-
 src/test/mir-opt/spanview-statement.rs        |  2 +-
 src/test/mir-opt/spanview-terminator.rs       |  2 +-
 ...l => spanview_block.main.built.after.html} |  2 +-
 ... spanview_statement.main.built.after.html} |  2 +-
 ...spanview_terminator.main.built.after.html} |  2 +-
 ..._live_dead_in_statics.XXX.built.after.mir} |  2 +-
 .../mir-opt/storage_live_dead_in_statics.rs   |  2 +-
 ..._out.move_out_by_subslice.built.after.mir} |  2 +-
 ...ove_out.move_out_from_end.built.after.mir} |  2 +-
 src/test/mir-opt/uniform_array_move_out.rs    |  4 +-
 src/test/mir-opt/unusual-item-types.rs        |  6 +-
 ...em_types.E-V-{constant#0}.built.after.mir} |  2 +-
 ...es.Test-X-{constructor#0}.built.after.mir} |  2 +-
 ...pl#0}-ASSOCIATED_CONSTANT.built.after.mir} |  2 +-
 52 files changed, 136 insertions(+), 112 deletions(-)
 rename src/test/mir-opt/{match_false_edges.full_tested_match.PromoteTemps.after.mir => building/match_false_edges.full_tested_match.built.after.mir} (85%)
 rename src/test/mir-opt/{match_false_edges.full_tested_match2.PromoteTemps.before.mir => building/match_false_edges.full_tested_match2.built.after.mir} (91%)
 rename src/test/mir-opt/{match_false_edges.main.PromoteTemps.before.mir => building/match_false_edges.main.built.after.mir} (83%)
 rename src/test/mir-opt/{ => building}/match_false_edges.rs (77%)
 rename src/test/mir-opt/{const_promotion_extern_static.BOP.mir_map.0.mir => const_promotion_extern_static.BOP.built.after.mir} (97%)
 rename src/test/mir-opt/{enum_cast.bar.mir_map.0.mir => enum_cast.bar.built.after.mir} (96%)
 rename src/test/mir-opt/{enum_cast.boo.mir_map.0.mir => enum_cast.boo.built.after.mir} (96%)
 rename src/test/mir-opt/{enum_cast.droppy.mir_map.0.mir => enum_cast.droppy.built.after.mir} (99%)
 rename src/test/mir-opt/{enum_cast.foo.mir_map.0.mir => enum_cast.foo.built.after.mir} (96%)
 rename src/test/mir-opt/{graphviz.main.mir_map.0.dot => graphviz.main.built.after.dot} (100%)
 rename src/test/mir-opt/{issue_101867.main.mir_map.0.mir => issue_101867.main.built.after.mir} (99%)
 rename src/test/mir-opt/{issue_49232.main.mir_map.0.mir => issue_49232.main.built.after.mir} (99%)
 rename src/test/mir-opt/{issue_72181.bar.mir_map.0.mir => issue_72181.bar.built.after.mir} (96%)
 rename src/test/mir-opt/{issue_72181.foo.mir_map.0.mir => issue_72181.foo.built.after.mir} (98%)
 rename src/test/mir-opt/{issue_72181.main.mir_map.0.mir => issue_72181.main.built.after.mir} (99%)
 rename src/test/mir-opt/{issue_72181_1.f.mir_map.0.mir => issue_72181_1.f.built.after.mir} (97%)
 rename src/test/mir-opt/{issue_72181_1.main.mir_map.0.mir => issue_72181_1.main.built.after.mir} (99%)
 rename src/test/mir-opt/{issue_91633.bar.mir_map.0.mir => issue_91633.bar.built.after.mir} (98%)
 rename src/test/mir-opt/{issue_91633.foo.mir_map.0.mir => issue_91633.foo.built.after.mir} (99%)
 rename src/test/mir-opt/{issue_91633.fun.mir_map.0.mir => issue_91633.fun.built.after.mir} (98%)
 rename src/test/mir-opt/{issue_91633.hey.mir_map.0.mir => issue_91633.hey.built.after.mir} (98%)
 rename src/test/mir-opt/{issue_99325.main.mir_map.0.mir => issue_99325.main.built.after.mir} (99%)
 rename src/test/mir-opt/{receiver_ptr_mutability.main.mir_map.0.mir => receiver_ptr_mutability.main.built.after.mir} (99%)
 rename src/test/mir-opt/{simple_match.match_bool.mir_map.0.mir => simple_match.match_bool.built.after.mir} (96%)
 rename src/test/mir-opt/{spanview_block.main.mir_map.0.html => spanview_block.main.built.after.html} (97%)
 rename src/test/mir-opt/{spanview_statement.main.mir_map.0.html => spanview_statement.main.built.after.html} (97%)
 rename src/test/mir-opt/{spanview_terminator.main.mir_map.0.html => spanview_terminator.main.built.after.html} (97%)
 rename src/test/mir-opt/{storage_live_dead_in_statics.XXX.mir_map.0.mir => storage_live_dead_in_statics.XXX.built.after.mir} (99%)
 rename src/test/mir-opt/{uniform_array_move_out.move_out_by_subslice.mir_map.0.mir => uniform_array_move_out.move_out_by_subslice.built.after.mir} (99%)
 rename src/test/mir-opt/{uniform_array_move_out.move_out_from_end.mir_map.0.mir => uniform_array_move_out.move_out_from_end.built.after.mir} (99%)
 rename src/test/mir-opt/{unusual_item_types.E-V-{constant#0}.mir_map.0.mir => unusual_item_types.E-V-{constant#0}.built.after.mir} (88%)
 rename src/test/mir-opt/{unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir => unusual_item_types.Test-X-{constructor#0}.built.after.mir} (94%)
 rename src/test/mir-opt/{unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir => unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir} (94%)

diff --git a/compiler/rustc_mir_transform/src/lib.rs b/compiler/rustc_mir_transform/src/lib.rs
index 5be2232547bd6..4791be1306c1b 100644
--- a/compiler/rustc_mir_transform/src/lib.rs
+++ b/compiler/rustc_mir_transform/src/lib.rs
@@ -288,7 +288,7 @@ fn mir_const<'tcx>(
 
     let mut body = tcx.mir_built(def).steal();
 
-    rustc_middle::mir::dump_mir(tcx, None, "mir_map", &0, &body, |_, _| Ok(()));
+    pass_manager::dump_mir_for_phase_change(tcx, &body);
 
     pm::run_passes(
         tcx,
diff --git a/compiler/rustc_mir_transform/src/shim.rs b/compiler/rustc_mir_transform/src/shim.rs
index c19380ef89cc5..343bb3d44e8d1 100644
--- a/compiler/rustc_mir_transform/src/shim.rs
+++ b/compiler/rustc_mir_transform/src/shim.rs
@@ -845,7 +845,7 @@ pub fn build_adt_ctor(tcx: TyCtxt<'_>, ctor_id: DefId) -> Body<'_> {
         span,
     );
 
-    rustc_middle::mir::dump_mir(tcx, None, "mir_map", &0, &body, |_, _| Ok(()));
+    crate::pass_manager::dump_mir_for_phase_change(tcx, &body);
 
     body
 }
diff --git a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
similarity index 85%
rename from src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
rename to src/test/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
index b193a8d76fcba..9a190c3d60ea4 100644
--- a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
+++ b/src/test/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `full_tested_match` after PromoteTemps
+// MIR for `full_tested_match` after built
 
 fn full_tested_match() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:28: +0:28
@@ -12,7 +12,6 @@ fn full_tested_match() -> () {
     let mut _8: i32;                     // in scope 0 at $DIR/match_false_edges.rs:+2:35: +2:36
     let _9: i32;                         // in scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
     let mut _10: i32;                    // in scope 0 at $DIR/match_false_edges.rs:+3:24: +3:25
-    let mut _11: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
     scope 1 {
     }
     scope 2 {
@@ -34,7 +33,7 @@ fn full_tested_match() -> () {
 
     bb1: {
         _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
     }
 
     bb2: {
@@ -42,7 +41,7 @@ fn full_tested_match() -> () {
     }
 
     bb3: {
-        falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
+        falseEdge -> [real: bb10, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
     }
 
     bb4: {
@@ -51,14 +50,10 @@ fn full_tested_match() -> () {
 
     bb5: {
         StorageLive(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
-        _11 = const _;                   // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
-                                         // mir::Constant
-                                         // + span: $DIR/match_false_edges.rs:14:14: 14:15
-                                         // + literal: Const { ty: &Option<i32>, val: Unevaluated(full_tested_match, [], Some(promoted[0])) }
-        _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
+        _6 = &((_2 as Some).0: i32);     // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
         _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
-        _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+        _7 = guard() -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:14:20: 14:25
                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
@@ -80,16 +75,20 @@ fn full_tested_match() -> () {
         StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
     }
 
     bb8: {
+        goto -> bb9;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+    }
+
+    bb9: {
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         goto -> bb3;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
     }
 
-    bb9: {
+    bb10: {
         StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
         _9 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
         StorageLive(_10);                // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
@@ -97,17 +96,17 @@ fn full_tested_match() -> () {
         _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:+3:20: +3:26
         StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:+3:25: +3:26
         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
     }
 
-    bb10: {
+    bb11: {
         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:28: +6:2
         return;                          // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
     }
 
-    bb11 (cleanup): {
+    bb12 (cleanup): {
         resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
     }
 }
diff --git a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
similarity index 91%
rename from src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir
rename to src/test/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
index 145ed878fc9e4..1c9953e7efc11 100644
--- a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir
+++ b/src/test/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `full_tested_match2` before PromoteTemps
+// MIR for `full_tested_match2` after built
 
 fn full_tested_match2() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:29: +0:29
@@ -32,7 +32,7 @@ fn full_tested_match2() -> () {
     }
 
     bb1: {
-        falseEdge -> [real: bb9, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:13
+        falseEdge -> [real: bb10, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:13
     }
 
     bb2: {
@@ -47,7 +47,7 @@ fn full_tested_match2() -> () {
         _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:+4:20: +4:26
         StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:+4:25: +4:26
         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
     }
 
     bb4: {
@@ -59,7 +59,7 @@ fn full_tested_match2() -> () {
         _6 = &((_2 as Some).0: i32);     // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
         _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
-        _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+        _7 = guard() -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:25:20: 25:25
                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
@@ -81,28 +81,32 @@ fn full_tested_match2() -> () {
         StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
     }
 
     bb8: {
+        goto -> bb9;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+    }
+
+    bb9: {
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
     }
 
-    bb9: {
+    bb10: {
         _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
     }
 
-    bb10: {
+    bb11: {
         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:29: +6:2
         return;                          // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
     }
 
-    bb11 (cleanup): {
+    bb12 (cleanup): {
         resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
     }
 }
diff --git a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir b/src/test/mir-opt/building/match_false_edges.main.built.after.mir
similarity index 83%
rename from src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir
rename to src/test/mir-opt/building/match_false_edges.main.built.after.mir
index 8f40e8a887f2d..08c67d39d7807 100644
--- a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir
+++ b/src/test/mir-opt/building/match_false_edges.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` before PromoteTemps
+// MIR for `main` after built
 
 fn main() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:11: +0:11
@@ -43,41 +43,54 @@ fn main() -> () {
     }
 
     bb1: {
-        falseEdge -> [real: bb9, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
+        falseEdge -> [real: bb13, imaginary: bb6]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
     }
 
     bb2: {
-        falseEdge -> [real: bb5, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
+        falseEdge -> [real: bb8, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
     }
 
     bb3: {
+        goto -> bb1;                     // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
+    }
+
+    bb4: {
+        _3 = discriminant(_2);           // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
+        switchInt(move _3) -> [1_isize: bb6, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
+    }
+
+    bb5: {
         StorageLive(_14);                // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
         _14 = _2;                        // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
         _1 = const 4_i32;                // scope 5 at $DIR/match_false_edges.rs:+5:15: +5:16
         StorageDead(_14);                // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
     }
 
-    bb4: {
-        falseEdge -> [real: bb10, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
+    bb6: {
+        falseEdge -> [real: bb14, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
     }
 
-    bb5: {
+    bb7: {
+        goto -> bb5;                     // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
+    }
+
+    bb8: {
         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
         _7 = &((_2 as Some).0: i32);     // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
         _5 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
         StorageLive(_8);                 // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
-        _8 = guard() -> [return: bb6, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+        _8 = guard() -> [return: bb9, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:34:21: 34:26
                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
     }
 
-    bb6: {
-        switchInt(move _8) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+    bb9: {
+        switchInt(move _8) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
     }
 
-    bb7: {
+    bb10: {
         StorageDead(_8);                 // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
         FakeRead(ForMatchGuard, _5);     // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
         FakeRead(ForGuardBinding, _7);   // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
@@ -86,41 +99,45 @@ fn main() -> () {
         _1 = const 1_i32;                // scope 2 at $DIR/match_false_edges.rs:+2:32: +2:33
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
     }
 
-    bb8: {
+    bb11: {
+        goto -> bb12;                    // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+    }
+
+    bb12: {
         StorageDead(_8);                 // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
-        falseEdge -> [real: bb1, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+        falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
     }
 
-    bb9: {
+    bb13: {
         StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
         _9 = _2;                         // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
         _1 = const 2_i32;                // scope 3 at $DIR/match_false_edges.rs:+3:15: +3:16
         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
     }
 
-    bb10: {
+    bb14: {
         StorageLive(_11);                // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
         _11 = &((_2 as Some).0: i32);    // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
         _5 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
         StorageLive(_12);                // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
         StorageLive(_13);                // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
         _13 = (*_11);                    // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
-        _12 = guard2(move _13) -> [return: bb11, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+        _12 = guard2(move _13) -> [return: bb15, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:36:20: 36:26
                                          // + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(<ZST>) }
     }
 
-    bb11: {
-        switchInt(move _12) -> [false: bb13, otherwise: bb12]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+    bb15: {
+        switchInt(move _12) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
     }
 
-    bb12: {
+    bb16: {
         StorageDead(_13);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         StorageDead(_12);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         FakeRead(ForMatchGuard, _5);     // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
@@ -130,24 +147,28 @@ fn main() -> () {
         _1 = const 3_i32;                // scope 4 at $DIR/match_false_edges.rs:+4:33: +4:34
         StorageDead(_10);                // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
         StorageDead(_11);                // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
     }
 
-    bb13: {
+    bb17: {
+        goto -> bb18;                    // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+    }
+
+    bb18: {
         StorageDead(_13);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         StorageDead(_12);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         StorageDead(_11);                // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
-        falseEdge -> [real: bb3, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+        falseEdge -> [real: bb7, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
     }
 
-    bb14: {
+    bb19: {
         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:11: +7:2
         return;                          // scope 0 at $DIR/match_false_edges.rs:+7:2: +7:2
     }
 
-    bb15 (cleanup): {
+    bb20 (cleanup): {
         resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +7:2
     }
 }
diff --git a/src/test/mir-opt/match_false_edges.rs b/src/test/mir-opt/building/match_false_edges.rs
similarity index 77%
rename from src/test/mir-opt/match_false_edges.rs
rename to src/test/mir-opt/building/match_false_edges.rs
index 3603253dafcc3..ddfcc14931918 100644
--- a/src/test/mir-opt/match_false_edges.rs
+++ b/src/test/mir-opt/building/match_false_edges.rs
@@ -8,7 +8,7 @@ fn guard2(_: i32) -> bool {
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR match_false_edges.full_tested_match.PromoteTemps.after.mir
+// EMIT_MIR match_false_edges.full_tested_match.built.after.mir
 pub fn full_tested_match() {
     let _ = match Some(42) {
         Some(x) if guard() => (1, x),
@@ -19,7 +19,7 @@ pub fn full_tested_match() {
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR match_false_edges.full_tested_match2.PromoteTemps.before.mir
+// EMIT_MIR match_false_edges.full_tested_match2.built.after.mir
 pub fn full_tested_match2() {
     let _ = match Some(42) {
         Some(x) if guard() => (1, x),
@@ -28,7 +28,7 @@ pub fn full_tested_match2() {
     };
 }
 
-// EMIT_MIR match_false_edges.main.PromoteTemps.before.mir
+// EMIT_MIR match_false_edges.main.built.after.mir
 fn main() {
     let _ = match Some(1) {
         Some(_w) if guard() => 1,
diff --git a/src/test/mir-opt/const-promotion-extern-static.rs b/src/test/mir-opt/const-promotion-extern-static.rs
index a0d4e9b2c65ae..e4261cfe50447 100644
--- a/src/test/mir-opt/const-promotion-extern-static.rs
+++ b/src/test/mir-opt/const-promotion-extern-static.rs
@@ -12,7 +12,7 @@ static mut BAR: *const &i32 = [&Y].as_ptr();
 // EMIT_MIR const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
 static mut FOO: *const &i32 = [unsafe { &X }].as_ptr();
 
-// EMIT_MIR const_promotion_extern_static.BOP.mir_map.0.mir
+// EMIT_MIR const_promotion_extern_static.BOP.built.after.mir
 static BOP: &i32 = &13;
 
 fn main() {}
diff --git a/src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir b/src/test/mir-opt/const_promotion_extern_static.BOP.built.after.mir
similarity index 97%
rename from src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir
rename to src/test/mir-opt/const_promotion_extern_static.BOP.built.after.mir
index 90920fbe7f805..5bda86bbd4f50 100644
--- a/src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir
+++ b/src/test/mir-opt/const_promotion_extern_static.BOP.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `BOP` 0 mir_map
+// MIR for `BOP` after built
 
 static BOP: &i32 = {
     let mut _0: &i32;                    // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:13: +0:17
diff --git a/src/test/mir-opt/enum_cast.bar.mir_map.0.mir b/src/test/mir-opt/enum_cast.bar.built.after.mir
similarity index 96%
rename from src/test/mir-opt/enum_cast.bar.mir_map.0.mir
rename to src/test/mir-opt/enum_cast.bar.built.after.mir
index e58085f701ac2..194b107bead89 100644
--- a/src/test/mir-opt/enum_cast.bar.mir_map.0.mir
+++ b/src/test/mir-opt/enum_cast.bar.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `bar` 0 mir_map
+// MIR for `bar` after built
 
 fn bar(_1: Bar) -> usize {
     debug bar => _1;                     // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
diff --git a/src/test/mir-opt/enum_cast.boo.mir_map.0.mir b/src/test/mir-opt/enum_cast.boo.built.after.mir
similarity index 96%
rename from src/test/mir-opt/enum_cast.boo.mir_map.0.mir
rename to src/test/mir-opt/enum_cast.boo.built.after.mir
index 525c6234ed31d..dde26afc77a0c 100644
--- a/src/test/mir-opt/enum_cast.boo.mir_map.0.mir
+++ b/src/test/mir-opt/enum_cast.boo.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `boo` 0 mir_map
+// MIR for `boo` after built
 
 fn boo(_1: Boo) -> usize {
     debug boo => _1;                     // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
diff --git a/src/test/mir-opt/enum_cast.droppy.mir_map.0.mir b/src/test/mir-opt/enum_cast.droppy.built.after.mir
similarity index 99%
rename from src/test/mir-opt/enum_cast.droppy.mir_map.0.mir
rename to src/test/mir-opt/enum_cast.droppy.built.after.mir
index bb5faa48047a9..a43c523c71f3c 100644
--- a/src/test/mir-opt/enum_cast.droppy.mir_map.0.mir
+++ b/src/test/mir-opt/enum_cast.droppy.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `droppy` 0 mir_map
+// MIR for `droppy` after built
 
 fn droppy() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/enum_cast.rs:+0:13: +0:13
diff --git a/src/test/mir-opt/enum_cast.foo.mir_map.0.mir b/src/test/mir-opt/enum_cast.foo.built.after.mir
similarity index 96%
rename from src/test/mir-opt/enum_cast.foo.mir_map.0.mir
rename to src/test/mir-opt/enum_cast.foo.built.after.mir
index a1d29a0b90320..17e0abf2e3193 100644
--- a/src/test/mir-opt/enum_cast.foo.mir_map.0.mir
+++ b/src/test/mir-opt/enum_cast.foo.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `foo` 0 mir_map
+// MIR for `foo` after built
 
 fn foo(_1: Foo) -> usize {
     debug foo => _1;                     // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
diff --git a/src/test/mir-opt/enum_cast.rs b/src/test/mir-opt/enum_cast.rs
index 090142aaf3559..98fd5acfb14f9 100644
--- a/src/test/mir-opt/enum_cast.rs
+++ b/src/test/mir-opt/enum_cast.rs
@@ -1,6 +1,6 @@
-// EMIT_MIR enum_cast.foo.mir_map.0.mir
-// EMIT_MIR enum_cast.bar.mir_map.0.mir
-// EMIT_MIR enum_cast.boo.mir_map.0.mir
+// EMIT_MIR enum_cast.foo.built.after.mir
+// EMIT_MIR enum_cast.bar.built.after.mir
+// EMIT_MIR enum_cast.boo.built.after.mir
 
 enum Foo {
     A
@@ -27,7 +27,7 @@ fn boo(boo: Boo) -> usize {
     boo as usize
 }
 
-// EMIT_MIR enum_cast.droppy.mir_map.0.mir
+// EMIT_MIR enum_cast.droppy.built.after.mir
 enum Droppy {
     A, B, C
 }
diff --git a/src/test/mir-opt/graphviz.main.mir_map.0.dot b/src/test/mir-opt/graphviz.main.built.after.dot
similarity index 100%
rename from src/test/mir-opt/graphviz.main.mir_map.0.dot
rename to src/test/mir-opt/graphviz.main.built.after.dot
diff --git a/src/test/mir-opt/graphviz.rs b/src/test/mir-opt/graphviz.rs
index 074dba2c3738f..6906b86c2a5f4 100644
--- a/src/test/mir-opt/graphviz.rs
+++ b/src/test/mir-opt/graphviz.rs
@@ -1,5 +1,5 @@
 // Test graphviz output
 // compile-flags: -Z dump-mir-graphviz
 
-// EMIT_MIR graphviz.main.mir_map.0.dot
+// EMIT_MIR graphviz.main.built.after.dot
 fn main() {}
diff --git a/src/test/mir-opt/issue-101867.rs b/src/test/mir-opt/issue-101867.rs
index 8a357eb799514..a32d8cb37142c 100644
--- a/src/test/mir-opt/issue-101867.rs
+++ b/src/test/mir-opt/issue-101867.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR issue_101867.main.mir_map.0.mir
+// EMIT_MIR issue_101867.main.built.after.mir
 fn main() {
     let x: Option<u8> = Some(1);
     let Some(y) = x else {
diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/issue-49232.rs
index 86494c76aec51..7e9f0de81f749 100644
--- a/src/test/mir-opt/issue-49232.rs
+++ b/src/test/mir-opt/issue-49232.rs
@@ -1,7 +1,7 @@
 // We must mark a variable whose initialization fails due to an
 // abort statement as StorageDead.
 
-// EMIT_MIR issue_49232.main.mir_map.0.mir
+// EMIT_MIR issue_49232.main.built.after.mir
 fn main() {
     loop {
         let beacon = {
diff --git a/src/test/mir-opt/issue-72181-1.rs b/src/test/mir-opt/issue-72181-1.rs
index 91e98adbe8049..8ae2599ec73f8 100644
--- a/src/test/mir-opt/issue-72181-1.rs
+++ b/src/test/mir-opt/issue-72181-1.rs
@@ -6,12 +6,12 @@
 
 enum Void {}
 
-// EMIT_MIR issue_72181_1.f.mir_map.0.mir
+// EMIT_MIR issue_72181_1.f.built.after.mir
 fn f(v: Void) -> ! {
     match v {}
 }
 
-// EMIT_MIR issue_72181_1.main.mir_map.0.mir
+// EMIT_MIR issue_72181_1.main.built.after.mir
 fn main() {
     let v: Void = unsafe {
         std::mem::transmute::<(), Void>(())
diff --git a/src/test/mir-opt/issue-72181.rs b/src/test/mir-opt/issue-72181.rs
index ebb5f5042fccb..6a32d4bbee2f7 100644
--- a/src/test/mir-opt/issue-72181.rs
+++ b/src/test/mir-opt/issue-72181.rs
@@ -12,14 +12,14 @@ union Foo {
 }
 
 
-// EMIT_MIR issue_72181.foo.mir_map.0.mir
+// EMIT_MIR issue_72181.foo.built.after.mir
 fn foo(xs: [(Never, u32); 1]) -> u32 { xs[0].1 }
 
-// EMIT_MIR issue_72181.bar.mir_map.0.mir
+// EMIT_MIR issue_72181.bar.built.after.mir
 fn bar([(_, x)]: [(Never, u32); 1]) -> u32 { x }
 
 
-// EMIT_MIR issue_72181.main.mir_map.0.mir
+// EMIT_MIR issue_72181.main.built.after.mir
 fn main() {
     let _ = mem::size_of::<Foo>();
 
diff --git a/src/test/mir-opt/issue-91633.rs b/src/test/mir-opt/issue-91633.rs
index 8f66019857fbb..9127cacc97c5d 100644
--- a/src/test/mir-opt/issue-91633.rs
+++ b/src/test/mir-opt/issue-91633.rs
@@ -1,5 +1,5 @@
 // compile-flags: -Z mir-opt-level=0
-// EMIT_MIR issue_91633.hey.mir_map.0.mir
+// EMIT_MIR issue_91633.hey.built.after.mir
 fn hey<T> (it: &[T])
  where
      [T] : std::ops::Index<usize>,
@@ -7,7 +7,7 @@ fn hey<T> (it: &[T])
      let _ = &it[0];
  }
 
-// EMIT_MIR issue_91633.bar.mir_map.0.mir
+// EMIT_MIR issue_91633.bar.built.after.mir
 fn bar<T> (it: Box<[T]>)
  where
      [T] : std::ops::Index<usize>,
@@ -15,14 +15,14 @@ fn bar<T> (it: Box<[T]>)
      let _ = it[0];
  }
 
-// EMIT_MIR issue_91633.fun.mir_map.0.mir
+// EMIT_MIR issue_91633.fun.built.after.mir
 fn fun<T> (it: &[T]) -> &T
  {
      let f = &it[0];
      f
  }
 
-// EMIT_MIR issue_91633.foo.mir_map.0.mir
+// EMIT_MIR issue_91633.foo.built.after.mir
 fn foo<T: Clone> (it: Box<[T]>) -> T
  {
      let f = it[0].clone();
diff --git a/src/test/mir-opt/issue-99325.rs b/src/test/mir-opt/issue-99325.rs
index b79946ea8b56c..fe819cddb2c34 100644
--- a/src/test/mir-opt/issue-99325.rs
+++ b/src/test/mir-opt/issue-99325.rs
@@ -5,7 +5,7 @@ pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
     BYTES
 }
 
-// EMIT_MIR issue_99325.main.mir_map.0.mir
+// EMIT_MIR issue_99325.main.built.after.mir
 pub fn main() {
     assert_eq!(function_with_bytes::<b"AAAA">(), &[0x41, 0x41, 0x41, 0x41]);
     assert_eq!(function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(), b"AAAA");
diff --git a/src/test/mir-opt/issue_101867.main.mir_map.0.mir b/src/test/mir-opt/issue_101867.main.built.after.mir
similarity index 99%
rename from src/test/mir-opt/issue_101867.main.mir_map.0.mir
rename to src/test/mir-opt/issue_101867.main.built.after.mir
index 42a9e5587603d..6834205b649b2 100644
--- a/src/test/mir-opt/issue_101867.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_101867.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
 | 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<u8>) }, span: $DIR/issue-101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
diff --git a/src/test/mir-opt/issue_49232.main.mir_map.0.mir b/src/test/mir-opt/issue_49232.main.built.after.mir
similarity index 99%
rename from src/test/mir-opt/issue_49232.main.mir_map.0.mir
rename to src/test/mir-opt/issue_49232.main.built.after.mir
index 821323b5e2426..b90f8c13589fa 100644
--- a/src/test/mir-opt/issue_49232.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_49232.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 fn main() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/issue-49232.rs:+0:11: +0:11
diff --git a/src/test/mir-opt/issue_72181.bar.mir_map.0.mir b/src/test/mir-opt/issue_72181.bar.built.after.mir
similarity index 96%
rename from src/test/mir-opt/issue_72181.bar.mir_map.0.mir
rename to src/test/mir-opt/issue_72181.bar.built.after.mir
index 972ce1d507854..aa9c9986aac19 100644
--- a/src/test/mir-opt/issue_72181.bar.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.bar.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `bar` 0 mir_map
+// MIR for `bar` after built
 
 fn bar(_1: [(Never, u32); 1]) -> u32 {
     let mut _0: u32;                     // return place in scope 0 at $DIR/issue-72181.rs:+0:40: +0:43
diff --git a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir b/src/test/mir-opt/issue_72181.foo.built.after.mir
similarity index 98%
rename from src/test/mir-opt/issue_72181.foo.mir_map.0.mir
rename to src/test/mir-opt/issue_72181.foo.built.after.mir
index 534f131ea936b..1d771ad3656d2 100644
--- a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.foo.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `foo` 0 mir_map
+// MIR for `foo` after built
 
 fn foo(_1: [(Never, u32); 1]) -> u32 {
     debug xs => _1;                      // in scope 0 at $DIR/issue-72181.rs:+0:8: +0:10
diff --git a/src/test/mir-opt/issue_72181.main.mir_map.0.mir b/src/test/mir-opt/issue_72181.main.built.after.mir
similarity index 99%
rename from src/test/mir-opt/issue_72181.main.mir_map.0.mir
rename to src/test/mir-opt/issue_72181.main.built.after.mir
index 425906f84fcd6..afa09b16fe964 100644
--- a/src/test/mir-opt/issue_72181.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 fn main() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/issue-72181.rs:+0:11: +0:11
diff --git a/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.f.built.after.mir
similarity index 97%
rename from src/test/mir-opt/issue_72181_1.f.mir_map.0.mir
rename to src/test/mir-opt/issue_72181_1.f.built.after.mir
index e1a35d88bf1d9..31e997f9b33d9 100644
--- a/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181_1.f.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `f` 0 mir_map
+// MIR for `f` after built
 
 fn f(_1: Void) -> ! {
     debug v => _1;                       // in scope 0 at $DIR/issue-72181-1.rs:+0:6: +0:7
diff --git a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.main.built.after.mir
similarity index 99%
rename from src/test/mir-opt/issue_72181_1.main.mir_map.0.mir
rename to src/test/mir-opt/issue_72181_1.main.built.after.mir
index 336693337fb57..65177a81b03b4 100644
--- a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181_1.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
 | 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(Void) }, span: $DIR/issue-72181-1.rs:16:12: 16:16, inferred_ty: Void
diff --git a/src/test/mir-opt/issue_91633.bar.mir_map.0.mir b/src/test/mir-opt/issue_91633.bar.built.after.mir
similarity index 98%
rename from src/test/mir-opt/issue_91633.bar.mir_map.0.mir
rename to src/test/mir-opt/issue_91633.bar.built.after.mir
index 625f6c7361ac8..19b1b6fe12b8b 100644
--- a/src/test/mir-opt/issue_91633.bar.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.bar.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `bar` 0 mir_map
+// MIR for `bar` after built
 
 fn bar(_1: Box<[T]>) -> () {
     debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:12: +0:14
diff --git a/src/test/mir-opt/issue_91633.foo.mir_map.0.mir b/src/test/mir-opt/issue_91633.foo.built.after.mir
similarity index 99%
rename from src/test/mir-opt/issue_91633.foo.mir_map.0.mir
rename to src/test/mir-opt/issue_91633.foo.built.after.mir
index 9903e203a2312..1a6eee93d3689 100644
--- a/src/test/mir-opt/issue_91633.foo.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.foo.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `foo` 0 mir_map
+// MIR for `foo` after built
 
 fn foo(_1: Box<[T]>) -> T {
     debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:19: +0:21
diff --git a/src/test/mir-opt/issue_91633.fun.mir_map.0.mir b/src/test/mir-opt/issue_91633.fun.built.after.mir
similarity index 98%
rename from src/test/mir-opt/issue_91633.fun.mir_map.0.mir
rename to src/test/mir-opt/issue_91633.fun.built.after.mir
index ded9a4cf7e3f9..b3eea60033011 100644
--- a/src/test/mir-opt/issue_91633.fun.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.fun.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `fun` 0 mir_map
+// MIR for `fun` after built
 
 fn fun(_1: &[T]) -> &T {
     debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:12: +0:14
diff --git a/src/test/mir-opt/issue_91633.hey.mir_map.0.mir b/src/test/mir-opt/issue_91633.hey.built.after.mir
similarity index 98%
rename from src/test/mir-opt/issue_91633.hey.mir_map.0.mir
rename to src/test/mir-opt/issue_91633.hey.built.after.mir
index 37c3b3fcacafb..e7e31ad33c1be 100644
--- a/src/test/mir-opt/issue_91633.hey.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.hey.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `hey` 0 mir_map
+// MIR for `hey` after built
 
 fn hey(_1: &[T]) -> () {
     debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:12: +0:14
diff --git a/src/test/mir-opt/issue_99325.main.mir_map.0.mir b/src/test/mir-opt/issue_99325.main.built.after.mir
similarity index 99%
rename from src/test/mir-opt/issue_99325.main.mir_map.0.mir
rename to src/test/mir-opt/issue_99325.main.built.after.mir
index 165efa9df4118..f588f06b7e4a3 100644
--- a/src/test/mir-opt/issue_99325.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_99325.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
 | 0: user_ty: Canonical { max_universe: U0, variables: [], value: TypeOf(DefId(0:3 ~ issue_99325[8f58]::function_with_bytes), UserSubsts { substs: [Const { ty: &'static [u8; 4], kind: Value(Branch([Leaf(0x41), Leaf(0x41), Leaf(0x41), Leaf(0x41)])) }], user_self_ty: None }) }, span: $DIR/issue-99325.rs:10:16: 10:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
diff --git a/src/test/mir-opt/receiver-ptr-mutability.rs b/src/test/mir-opt/receiver-ptr-mutability.rs
index 8e2ff0451c63e..668530968fe51 100644
--- a/src/test/mir-opt/receiver-ptr-mutability.rs
+++ b/src/test/mir-opt/receiver-ptr-mutability.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR receiver_ptr_mutability.main.mir_map.0.mir
+// EMIT_MIR receiver_ptr_mutability.main.built.after.mir
 
 #![feature(arbitrary_self_types)]
 
diff --git a/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir b/src/test/mir-opt/receiver_ptr_mutability.main.built.after.mir
similarity index 99%
rename from src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir
rename to src/test/mir-opt/receiver_ptr_mutability.main.built.after.mir
index 45797ec0607c8..0192bdc2d5e3e 100644
--- a/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir
+++ b/src/test/mir-opt/receiver_ptr_mutability.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
 | 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut Test) }, span: $DIR/receiver-ptr-mutability.rs:14:14: 14:23, inferred_ty: *mut Test
diff --git a/src/test/mir-opt/simple-match.rs b/src/test/mir-opt/simple-match.rs
index 103033c4e2b86..0ef97dde63631 100644
--- a/src/test/mir-opt/simple-match.rs
+++ b/src/test/mir-opt/simple-match.rs
@@ -1,7 +1,7 @@
 // Test that we don't generate unnecessarily large MIR for very simple matches
 
 
-// EMIT_MIR simple_match.match_bool.mir_map.0.mir
+// EMIT_MIR simple_match.match_bool.built.after.mir
 fn match_bool(x: bool) -> usize {
     match x {
         true => 10,
diff --git a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir b/src/test/mir-opt/simple_match.match_bool.built.after.mir
similarity index 96%
rename from src/test/mir-opt/simple_match.match_bool.mir_map.0.mir
rename to src/test/mir-opt/simple_match.match_bool.built.after.mir
index 3bef6aa0579a7..5b101cbdee775 100644
--- a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir
+++ b/src/test/mir-opt/simple_match.match_bool.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `match_bool` 0 mir_map
+// MIR for `match_bool` after built
 
 fn match_bool(_1: bool) -> usize {
     debug x => _1;                       // in scope 0 at $DIR/simple-match.rs:+0:15: +0:16
diff --git a/src/test/mir-opt/spanview-block.rs b/src/test/mir-opt/spanview-block.rs
index fc1d6e0ede66e..0ecf35ad6a2e8 100644
--- a/src/test/mir-opt/spanview-block.rs
+++ b/src/test/mir-opt/spanview-block.rs
@@ -1,5 +1,5 @@
 // Test spanview block output
 // compile-flags: -Z dump-mir-spanview=block
 
-// EMIT_MIR spanview_block.main.mir_map.0.html
+// EMIT_MIR spanview_block.main.built.after.html
 fn main() {}
diff --git a/src/test/mir-opt/spanview-statement.rs b/src/test/mir-opt/spanview-statement.rs
index a43ad5e71a393..457052617b788 100644
--- a/src/test/mir-opt/spanview-statement.rs
+++ b/src/test/mir-opt/spanview-statement.rs
@@ -1,5 +1,5 @@
 // Test spanview output (the default value for `-Z dump-mir-spanview` is "statement")
 // compile-flags: -Z dump-mir-spanview
 
-// EMIT_MIR spanview_statement.main.mir_map.0.html
+// EMIT_MIR spanview_statement.main.built.after.html
 fn main() {}
diff --git a/src/test/mir-opt/spanview-terminator.rs b/src/test/mir-opt/spanview-terminator.rs
index 92e1411eadbda..76fced188f1db 100644
--- a/src/test/mir-opt/spanview-terminator.rs
+++ b/src/test/mir-opt/spanview-terminator.rs
@@ -1,5 +1,5 @@
 // Test spanview terminator output
 // compile-flags: -Z dump-mir-spanview=terminator
 
-// EMIT_MIR spanview_terminator.main.mir_map.0.html
+// EMIT_MIR spanview_terminator.main.built.after.html
 fn main() {}
diff --git a/src/test/mir-opt/spanview_block.main.mir_map.0.html b/src/test/mir-opt/spanview_block.main.built.after.html
similarity index 97%
rename from src/test/mir-opt/spanview_block.main.mir_map.0.html
rename to src/test/mir-opt/spanview_block.main.built.after.html
index 8e5268043e70c..fbf751d6d30b4 100644
--- a/src/test/mir-opt/spanview_block.main.mir_map.0.html
+++ b/src/test/mir-opt/spanview_block.main.built.after.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>spanview_block.main.mir_map.0</title>
+<title>spanview_block.main.built.after</title>
 <style>
     .line {
         counter-increment: line;
diff --git a/src/test/mir-opt/spanview_statement.main.mir_map.0.html b/src/test/mir-opt/spanview_statement.main.built.after.html
similarity index 97%
rename from src/test/mir-opt/spanview_statement.main.mir_map.0.html
rename to src/test/mir-opt/spanview_statement.main.built.after.html
index abbff2270b7f8..02b2720feefc9 100644
--- a/src/test/mir-opt/spanview_statement.main.mir_map.0.html
+++ b/src/test/mir-opt/spanview_statement.main.built.after.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>spanview_statement.main.mir_map.0</title>
+<title>spanview_statement.main.built.after</title>
 <style>
     .line {
         counter-increment: line;
diff --git a/src/test/mir-opt/spanview_terminator.main.mir_map.0.html b/src/test/mir-opt/spanview_terminator.main.built.after.html
similarity index 97%
rename from src/test/mir-opt/spanview_terminator.main.mir_map.0.html
rename to src/test/mir-opt/spanview_terminator.main.built.after.html
index 55fafd90b0aa2..a4cda7dd67ec6 100644
--- a/src/test/mir-opt/spanview_terminator.main.mir_map.0.html
+++ b/src/test/mir-opt/spanview_terminator.main.built.after.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>spanview_terminator.main.mir_map.0</title>
+<title>spanview_terminator.main.built.after</title>
 <style>
     .line {
         counter-increment: line;
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir b/src/test/mir-opt/storage_live_dead_in_statics.XXX.built.after.mir
similarity index 99%
rename from src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir
rename to src/test/mir-opt/storage_live_dead_in_statics.XXX.built.after.mir
index e50067ea25ef4..1d3f77e079baf 100644
--- a/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir
+++ b/src/test/mir-opt/storage_live_dead_in_statics.XXX.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `XXX` 0 mir_map
+// MIR for `XXX` after built
 
 static XXX: &Foo = {
     let mut _0: &Foo;                    // return place in scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:13: +0:25
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.rs b/src/test/mir-opt/storage_live_dead_in_statics.rs
index b03de8612fc1b..79f709148e304 100644
--- a/src/test/mir-opt/storage_live_dead_in_statics.rs
+++ b/src/test/mir-opt/storage_live_dead_in_statics.rs
@@ -1,7 +1,7 @@
 // Check that when we compile the static `XXX` into MIR, we do not
 // generate `StorageStart` or `StorageEnd` statements.
 
-// EMIT_MIR storage_live_dead_in_statics.XXX.mir_map.0.mir
+// EMIT_MIR storage_live_dead_in_statics.XXX.built.after.mir
 static XXX: &'static Foo = &Foo {
     tup: "hi",
     data: &[
diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.built.after.mir
similarity index 99%
rename from src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
rename to src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.built.after.mir
index 6a5021139cf61..234cd08397739 100644
--- a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
+++ b/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `move_out_by_subslice` 0 mir_map
+// MIR for `move_out_by_subslice` after built
 
 fn move_out_by_subslice() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/uniform_array_move_out.rs:+0:27: +0:27
diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.built.after.mir
similarity index 99%
rename from src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir
rename to src/test/mir-opt/uniform_array_move_out.move_out_from_end.built.after.mir
index 23a50b22ad141..24a189498d347 100644
--- a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir
+++ b/src/test/mir-opt/uniform_array_move_out.move_out_from_end.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `move_out_from_end` 0 mir_map
+// MIR for `move_out_from_end` after built
 
 fn move_out_from_end() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/uniform_array_move_out.rs:+0:24: +0:24
diff --git a/src/test/mir-opt/uniform_array_move_out.rs b/src/test/mir-opt/uniform_array_move_out.rs
index 35e4255287001..e925036ecf69a 100644
--- a/src/test/mir-opt/uniform_array_move_out.rs
+++ b/src/test/mir-opt/uniform_array_move_out.rs
@@ -1,12 +1,12 @@
 #![feature(box_syntax)]
 
-// EMIT_MIR uniform_array_move_out.move_out_from_end.mir_map.0.mir
+// EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir
 fn move_out_from_end() {
     let a = [box 1, box 2];
     let [.., _y] = a;
 }
 
-// EMIT_MIR uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
+// EMIT_MIR uniform_array_move_out.move_out_by_subslice.built.after.mir
 fn move_out_by_subslice() {
     let a = [box 1, box 2];
     let [_y @ ..] = a;
diff --git a/src/test/mir-opt/unusual-item-types.rs b/src/test/mir-opt/unusual-item-types.rs
index 9ef3d86472db2..6dad636416f22 100644
--- a/src/test/mir-opt/unusual-item-types.rs
+++ b/src/test/mir-opt/unusual-item-types.rs
@@ -5,19 +5,19 @@
 
 struct A;
 
-// EMIT_MIR unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
+// EMIT_MIR unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
 impl A {
     const ASSOCIATED_CONSTANT: i32 = 2;
 }
 
 // See #59021
-// EMIT_MIR unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir
+// EMIT_MIR unusual_item_types.Test-X-{constructor#0}.built.after.mir
 enum Test {
     X(usize),
     Y { a: usize },
 }
 
-// EMIT_MIR unusual_item_types.E-V-{constant#0}.mir_map.0.mir
+// EMIT_MIR unusual_item_types.E-V-{constant#0}.built.after.mir
 enum E {
     V = 5,
 }
diff --git a/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.built.after.mir
similarity index 88%
rename from src/test/mir-opt/unusual_item_types.E-V-{constant#0}.mir_map.0.mir
rename to src/test/mir-opt/unusual_item_types.E-V-{constant#0}.built.after.mir
index a72e00ecde75f..c8b0f8e41b77c 100644
--- a/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.mir_map.0.mir
+++ b/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `E::V::{constant#0}` 0 mir_map
+// MIR for `E::V::{constant#0}` after built
 
 E::V::{constant#0}: isize = {
     let mut _0: isize;                   // return place in scope 0 at $DIR/unusual-item-types.rs:+0:9: +0:10
diff --git a/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.built.after.mir
similarity index 94%
rename from src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir
rename to src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.built.after.mir
index 0686af46ed58e..a46e60173774e 100644
--- a/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir
+++ b/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `Test::X` 0 mir_map
+// MIR for `Test::X` after built
 
 fn Test::X(_1: usize) -> Test {
     let mut _0: Test;                    // return place in scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:6
diff --git a/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
similarity index 94%
rename from src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
rename to src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
index 5579d25a14fda..7cb9050bc4bc6 100644
--- a/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
+++ b/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` 0 mir_map
+// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` after built
 
 const <impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
     let mut _0: i32;                     // return place in scope 0 at $DIR/unusual-item-types.rs:+0:32: +0:35

From 51b03639d6ccc6efb97e046b7466538130e14ec1 Mon Sep 17 00:00:00 2001
From: Jakob Degen <jakob.e.degen@gmail.com>
Date: Wed, 26 Oct 2022 17:42:29 -0700
Subject: [PATCH 2/2] Move mir building mir-opt tests to own directory

---
 src/test/mir-opt/{ => building}/enum_cast.bar.built.after.mir     | 0
 src/test/mir-opt/{ => building}/enum_cast.boo.built.after.mir     | 0
 src/test/mir-opt/{ => building}/enum_cast.droppy.built.after.mir  | 0
 src/test/mir-opt/{ => building}/enum_cast.foo.built.after.mir     | 0
 src/test/mir-opt/{ => building}/enum_cast.rs                      | 0
 src/test/mir-opt/{ => building}/issue-101867.rs                   | 0
 src/test/mir-opt/{ => building}/issue-49232.rs                    | 0
 src/test/mir-opt/{ => building}/issue_101867.main.built.after.mir | 0
 src/test/mir-opt/{ => building}/issue_49232.main.built.after.mir  | 0
 src/test/mir-opt/{ => building}/receiver-ptr-mutability.rs        | 0
 .../{ => building}/receiver_ptr_mutability.main.built.after.mir   | 0
 src/test/mir-opt/{ => building}/simple-match.rs                   | 0
 .../{ => building}/simple_match.match_bool.built.after.mir        | 0
 .../storage_live_dead_in_statics.XXX.built.after.mir              | 0
 src/test/mir-opt/{ => building}/storage_live_dead_in_statics.rs   | 0
 .../uniform_array_move_out.move_out_by_subslice.built.after.mir   | 0
 .../uniform_array_move_out.move_out_from_end.built.after.mir      | 0
 src/test/mir-opt/{ => building}/uniform_array_move_out.rs         | 0
 18 files changed, 0 insertions(+), 0 deletions(-)
 rename src/test/mir-opt/{ => building}/enum_cast.bar.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/enum_cast.boo.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/enum_cast.droppy.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/enum_cast.foo.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/enum_cast.rs (100%)
 rename src/test/mir-opt/{ => building}/issue-101867.rs (100%)
 rename src/test/mir-opt/{ => building}/issue-49232.rs (100%)
 rename src/test/mir-opt/{ => building}/issue_101867.main.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/issue_49232.main.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/receiver-ptr-mutability.rs (100%)
 rename src/test/mir-opt/{ => building}/receiver_ptr_mutability.main.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/simple-match.rs (100%)
 rename src/test/mir-opt/{ => building}/simple_match.match_bool.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/storage_live_dead_in_statics.XXX.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/storage_live_dead_in_statics.rs (100%)
 rename src/test/mir-opt/{ => building}/uniform_array_move_out.move_out_by_subslice.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/uniform_array_move_out.move_out_from_end.built.after.mir (100%)
 rename src/test/mir-opt/{ => building}/uniform_array_move_out.rs (100%)

diff --git a/src/test/mir-opt/enum_cast.bar.built.after.mir b/src/test/mir-opt/building/enum_cast.bar.built.after.mir
similarity index 100%
rename from src/test/mir-opt/enum_cast.bar.built.after.mir
rename to src/test/mir-opt/building/enum_cast.bar.built.after.mir
diff --git a/src/test/mir-opt/enum_cast.boo.built.after.mir b/src/test/mir-opt/building/enum_cast.boo.built.after.mir
similarity index 100%
rename from src/test/mir-opt/enum_cast.boo.built.after.mir
rename to src/test/mir-opt/building/enum_cast.boo.built.after.mir
diff --git a/src/test/mir-opt/enum_cast.droppy.built.after.mir b/src/test/mir-opt/building/enum_cast.droppy.built.after.mir
similarity index 100%
rename from src/test/mir-opt/enum_cast.droppy.built.after.mir
rename to src/test/mir-opt/building/enum_cast.droppy.built.after.mir
diff --git a/src/test/mir-opt/enum_cast.foo.built.after.mir b/src/test/mir-opt/building/enum_cast.foo.built.after.mir
similarity index 100%
rename from src/test/mir-opt/enum_cast.foo.built.after.mir
rename to src/test/mir-opt/building/enum_cast.foo.built.after.mir
diff --git a/src/test/mir-opt/enum_cast.rs b/src/test/mir-opt/building/enum_cast.rs
similarity index 100%
rename from src/test/mir-opt/enum_cast.rs
rename to src/test/mir-opt/building/enum_cast.rs
diff --git a/src/test/mir-opt/issue-101867.rs b/src/test/mir-opt/building/issue-101867.rs
similarity index 100%
rename from src/test/mir-opt/issue-101867.rs
rename to src/test/mir-opt/building/issue-101867.rs
diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/building/issue-49232.rs
similarity index 100%
rename from src/test/mir-opt/issue-49232.rs
rename to src/test/mir-opt/building/issue-49232.rs
diff --git a/src/test/mir-opt/issue_101867.main.built.after.mir b/src/test/mir-opt/building/issue_101867.main.built.after.mir
similarity index 100%
rename from src/test/mir-opt/issue_101867.main.built.after.mir
rename to src/test/mir-opt/building/issue_101867.main.built.after.mir
diff --git a/src/test/mir-opt/issue_49232.main.built.after.mir b/src/test/mir-opt/building/issue_49232.main.built.after.mir
similarity index 100%
rename from src/test/mir-opt/issue_49232.main.built.after.mir
rename to src/test/mir-opt/building/issue_49232.main.built.after.mir
diff --git a/src/test/mir-opt/receiver-ptr-mutability.rs b/src/test/mir-opt/building/receiver-ptr-mutability.rs
similarity index 100%
rename from src/test/mir-opt/receiver-ptr-mutability.rs
rename to src/test/mir-opt/building/receiver-ptr-mutability.rs
diff --git a/src/test/mir-opt/receiver_ptr_mutability.main.built.after.mir b/src/test/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
similarity index 100%
rename from src/test/mir-opt/receiver_ptr_mutability.main.built.after.mir
rename to src/test/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
diff --git a/src/test/mir-opt/simple-match.rs b/src/test/mir-opt/building/simple-match.rs
similarity index 100%
rename from src/test/mir-opt/simple-match.rs
rename to src/test/mir-opt/building/simple-match.rs
diff --git a/src/test/mir-opt/simple_match.match_bool.built.after.mir b/src/test/mir-opt/building/simple_match.match_bool.built.after.mir
similarity index 100%
rename from src/test/mir-opt/simple_match.match_bool.built.after.mir
rename to src/test/mir-opt/building/simple_match.match_bool.built.after.mir
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.XXX.built.after.mir b/src/test/mir-opt/building/storage_live_dead_in_statics.XXX.built.after.mir
similarity index 100%
rename from src/test/mir-opt/storage_live_dead_in_statics.XXX.built.after.mir
rename to src/test/mir-opt/building/storage_live_dead_in_statics.XXX.built.after.mir
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.rs b/src/test/mir-opt/building/storage_live_dead_in_statics.rs
similarity index 100%
rename from src/test/mir-opt/storage_live_dead_in_statics.rs
rename to src/test/mir-opt/building/storage_live_dead_in_statics.rs
diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.built.after.mir b/src/test/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
similarity index 100%
rename from src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.built.after.mir
rename to src/test/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.built.after.mir b/src/test/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
similarity index 100%
rename from src/test/mir-opt/uniform_array_move_out.move_out_from_end.built.after.mir
rename to src/test/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
diff --git a/src/test/mir-opt/uniform_array_move_out.rs b/src/test/mir-opt/building/uniform_array_move_out.rs
similarity index 100%
rename from src/test/mir-opt/uniform_array_move_out.rs
rename to src/test/mir-opt/building/uniform_array_move_out.rs