about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-03-15 11:30:33 +0000
committerbors <bors@rust-lang.org>2021-03-15 11:30:33 +0000
commit7a7bbdb3abfa72ca717ef54ffc4f307d0d44de67 (patch)
treee85839c159556d7628b8d842bb06a3bee5de01e8 /src
parent2a55274e0ca9bf0b60cf72744b91237de625863e (diff)
parent47f8bacc469a6d90ace323eb482f273988674dd1 (diff)
downloadrust-7a7bbdb3abfa72ca717ef54ffc4f307d0d44de67.tar.gz
rust-7a7bbdb3abfa72ca717ef54ffc4f307d0d44de67.zip
Auto merge of #83118 - erikdesjardins:removezst, r=oli-obk
Rebase and fixup #80493: Remove MIR assignments to ZST types

closes #80493

cc `@simonvandel`

r? `@oli-obk`
Diffstat (limited to 'src')
-rw-r--r--src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir1
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir1
-rw-r--r--src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir1
-rw-r--r--src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff1
-rw-r--r--src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff1
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff1
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff1
-rw-r--r--src/test/mir-opt/inline/inline_cycle.two.Inline.diff1
-rw-r--r--src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff1
-rw-r--r--src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff1
-rw-r--r--src/test/mir-opt/inline/inline_options.main.Inline.after.mir1
-rw-r--r--src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir1
-rw-r--r--src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff1
-rw-r--r--src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff1
-rw-r--r--src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir1
-rw-r--r--src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir1
-rw-r--r--src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.32bit.diff29
-rw-r--r--src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.64bit.diff29
-rw-r--r--src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.32bit.mir13
-rw-r--r--src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.64bit.mir13
-rw-r--r--src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff2
-rw-r--r--src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff1
-rw-r--r--src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff1
-rw-r--r--src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff1
-rw-r--r--src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff1
-rw-r--r--src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff6
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff2
-rw-r--r--src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir1
-rw-r--r--src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir1
-rw-r--r--src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir1
-rw-r--r--src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir2
-rw-r--r--src/test/run-make/const_fn_mir/dump.mir1
39 files changed, 45 insertions, 89 deletions
diff --git a/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir b/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
index c2f75e5daee..30512d0bbe8 100644
--- a/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
+++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
@@ -4,7 +4,6 @@ fn hello() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
 
     bb0: {
-        _0 = const ();                   // scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
         return;                          // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
     }
 }
diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir
index a78a6341c29..c6f1d86ae3a 100644
--- a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir
+++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.32bit.mir
@@ -22,7 +22,6 @@ fn main() -> () {
         _2 = const 3_i32;                // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
         StorageLive(_3);                 // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
         _3 = const 42_u32;               // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
-        _0 = const ();                   // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
         StorageDead(_3);                 // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
         StorageDead(_2);                 // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
         StorageDead(_1);                 // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
diff --git a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir
index a78a6341c29..c6f1d86ae3a 100644
--- a/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir
+++ b/src/test/mir-opt/const_prop/optimizes_into_variable.main.SimplifyLocals.after.64bit.mir
@@ -22,7 +22,6 @@ fn main() -> () {
         _2 = const 3_i32;                // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
         StorageLive(_3);                 // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
         _3 = const 42_u32;               // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
-        _0 = const ();                   // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
         StorageDead(_3);                 // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
         StorageDead(_2);                 // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
         StorageDead(_1);                 // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
diff --git a/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff
index 1fbda50f783..621a747e131 100644
--- a/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff
+++ b/src/test/mir-opt/dest-prop/cycle.main.DestinationPropagation.diff
@@ -56,7 +56,6 @@
           StorageLive(_6);                 // scope 3 at $DIR/cycle.rs:14:10: 14:11
 -         _6 = _1;                         // scope 3 at $DIR/cycle.rs:14:10: 14:11
 +         _6 = _4;                         // scope 3 at $DIR/cycle.rs:14:10: 14:11
-          _5 = const ();                   // scope 4 at $DIR/cycle.rs:14:5: 14:12
           StorageDead(_6);                 // scope 3 at $DIR/cycle.rs:14:11: 14:12
           StorageDead(_5);                 // scope 3 at $DIR/cycle.rs:14:12: 14:13
           _0 = const ();                   // scope 0 at $DIR/cycle.rs:8:11: 15:2
diff --git a/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff b/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
index 0ff3e4b2dcf..a3368dcfcc6 100644
--- a/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
+++ b/src/test/mir-opt/dest-prop/union.main.DestinationPropagation.diff
@@ -31,7 +31,6 @@
           StorageLive(_3);                 // scope 1 at $DIR/union.rs:15:5: 15:27
           StorageLive(_4);                 // scope 1 at $DIR/union.rs:15:10: 15:26
           _4 = (_1.0: u32);                // scope 2 at $DIR/union.rs:15:19: 15:24
-          _3 = const ();                   // scope 3 at $DIR/union.rs:15:5: 15:27
           StorageDead(_4);                 // scope 1 at $DIR/union.rs:15:26: 15:27
           StorageDead(_3);                 // scope 1 at $DIR/union.rs:15:27: 15:28
           _0 = const ();                   // scope 0 at $DIR/union.rs:8:11: 16:2
diff --git a/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff
index c95cf476957..77eb326cd82 100644
--- a/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff
@@ -16,7 +16,6 @@
 -     }
 - 
 -     bb1: {
-+         _1 = const ();                   // scope 1 at $DIR/inline-compatibility.rs:24:5: 24:18
           StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:24:18: 24:19
           _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:23:37: 25:2
           return;                          // scope 0 at $DIR/inline-compatibility.rs:25:2: 25:2
diff --git a/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff
index 2bb92834322..a32db48715c 100644
--- a/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff
@@ -16,7 +16,6 @@
 -     }
 - 
 -     bb1: {
-+         _1 = const ();                   // scope 1 at $DIR/inline-compatibility.rs:13:5: 13:21
           StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:13:21: 13:22
           _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:12:40: 14:2
           return;                          // scope 0 at $DIR/inline-compatibility.rs:14:2: 14:2
diff --git a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
index b44baca9bf4..aaf65c5d0a5 100644
--- a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
+++ b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
@@ -37,7 +37,6 @@
 +         StorageDead(_5);                 // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
 +         StorageDead(_4);                 // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
 +         StorageDead(_3);                 // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
-+         _1 = const ();                   // scope 1 at $DIR/inline-cycle.rs:49:5: 49:12
 +         StorageDead(_2);                 // scope 0 at $DIR/inline-cycle.rs:49:5: 49:12
           StorageDead(_1);                 // scope 0 at $DIR/inline-cycle.rs:49:12: 49:13
           _0 = const ();                   // scope 0 at $DIR/inline-cycle.rs:48:10: 50:2
diff --git a/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff b/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff
index 334cf5a08e2..916244f1f6a 100644
--- a/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff
+++ b/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff
@@ -36,7 +36,6 @@
 -     }
 - 
 -     bb3: {
-+         _3 = const ();                   // scope 1 at $DIR/inline-instruction-set.rs:53:5: 53:30
           StorageDead(_3);                 // scope 0 at $DIR/inline-instruction-set.rs:53:30: 53:31
           _0 = const ();                   // scope 0 at $DIR/inline-instruction-set.rs:50:18: 54:2
           return;                          // scope 0 at $DIR/inline-instruction-set.rs:54:2: 54:2
diff --git a/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff b/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff
index 920b68c9daa..8907bae9177 100644
--- a/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff
+++ b/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff
@@ -27,7 +27,6 @@
 -     }
 - 
 -     bb2: {
-+         _2 = const ();                   // scope 1 at $DIR/inline-instruction-set.rs:43:5: 43:26
           StorageDead(_2);                 // scope 0 at $DIR/inline-instruction-set.rs:43:26: 43:27
           StorageLive(_3);                 // scope 0 at $DIR/inline-instruction-set.rs:46:5: 46:30
 -         _3 = instruction_set_default() -> bb3; // scope 0 at $DIR/inline-instruction-set.rs:46:5: 46:30
diff --git a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir
index 4cbdde2ba07..865cf25863f 100644
--- a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir
@@ -48,7 +48,6 @@ fn main() -> () {
 
     bb4: {
         StorageDead(_5);                 // scope 1 at $DIR/inline-options.rs:10:5: 10:21
-        _2 = const ();                   // scope 1 at $DIR/inline-options.rs:10:5: 10:21
         StorageDead(_2);                 // scope 0 at $DIR/inline-options.rs:10:21: 10:22
         _0 = const ();                   // scope 0 at $DIR/inline-options.rs:8:11: 11:2
         return;                          // scope 0 at $DIR/inline-options.rs:11:2: 11:2
diff --git a/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
index 3d386e3b175..e5ce03a453b 100644
--- a/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
@@ -29,7 +29,6 @@ fn main() -> () {
         _5 = move (_3.0: ());            // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
         StorageLive(_6);                 // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
         _6 = const ();                   // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
-        _0 = const ();                   // scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
         StorageDead(_6);                 // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
         StorageDead(_5);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
         StorageDead(_4);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:6:9: 6:10
diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff
index e2ec0e82ebf..f6e6614bb6e 100644
--- a/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff
+++ b/src/test/mir-opt/issue_73223.main.PreCodegen.32bit.diff
@@ -117,7 +117,6 @@
           StorageDead(_10);                // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageDead(_9);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageDead(_6);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-          _0 = const ();                   // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
           StorageDead(_4);                 // scope 1 at $DIR/issue-73223.rs:9:1: 9:2
           StorageDead(_1);                 // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
           return;                          // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
diff --git a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff
index e2ec0e82ebf..f6e6614bb6e 100644
--- a/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff
+++ b/src/test/mir-opt/issue_73223.main.PreCodegen.64bit.diff
@@ -117,7 +117,6 @@
           StorageDead(_10);                // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageDead(_9);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageDead(_6);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-          _0 = const ();                   // scope 0 at $DIR/issue-73223.rs:1:11: 9:2
           StorageDead(_4);                 // scope 1 at $DIR/issue-73223.rs:9:1: 9:2
           StorageDead(_1);                 // scope 0 at $DIR/issue-73223.rs:9:1: 9:2
           return;                          // scope 0 at $DIR/issue-73223.rs:9:2: 9:2
diff --git a/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir b/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir
index a87d5e1f0ff..380f6ce9ba7 100644
--- a/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir
+++ b/src/test/mir-opt/lower_intrinsics.f_u64.PreCodegen.before.mir
@@ -27,7 +27,6 @@ fn f_u64() -> () {
         StorageDead(_3);                 // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
         StorageDead(_2);                 // scope 1 at $DIR/lower_intrinsics.rs:35:5: 35:21
         StorageDead(_1);                 // scope 0 at $DIR/lower_intrinsics.rs:35:5: 35:21
-        _0 = const ();                   // scope 0 at $DIR/lower_intrinsics.rs:34:16: 36:2
         return;                          // scope 0 at $DIR/lower_intrinsics.rs:36:2: 36:2
     }
 }
diff --git a/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir b/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir
index f8857eda737..2b9ffaaf971 100644
--- a/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir
+++ b/src/test/mir-opt/lower_intrinsics.f_unit.PreCodegen.before.mir
@@ -22,7 +22,6 @@ fn f_unit() -> () {
     bb1: {
         StorageDead(_2);                 // scope 1 at $DIR/lower_intrinsics.rs:29:5: 29:19
         StorageDead(_1);                 // scope 0 at $DIR/lower_intrinsics.rs:29:18: 29:19
-        _0 = const ();                   // scope 0 at $DIR/lower_intrinsics.rs:28:17: 30:2
         return;                          // scope 0 at $DIR/lower_intrinsics.rs:30:2: 30:2
     }
 }
diff --git a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.32bit.diff b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.32bit.diff
index 6ee8e6b7748..9f0db1db1b2 100644
--- a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.32bit.diff
+++ b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.32bit.diff
@@ -5,22 +5,25 @@
       debug bar => _1;                     // in scope 0 at $DIR/matches_reduce_branches.rs:7:8: 7:11
       let mut _0: ();                      // return place in scope 0 at $DIR/matches_reduce_branches.rs:7:25: 7:25
       let mut _2: isize;                   // in scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
++     let mut _3: isize;                   // in scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
   
       bb0: {
           _2 = discriminant(_1);           // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-          switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-      }
-  
-      bb1: {
-          _0 = const ();                   // scope 0 at $DIR/matches_reduce_branches.rs:10:6: 10:6
-          goto -> bb3;                     // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
-      }
-  
-      bb2: {
-          goto -> bb3;                     // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-      }
-  
-      bb3: {
+-         switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
+-     }
+- 
+-     bb1: {
+-         goto -> bb3;                     // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
+-     }
+- 
+-     bb2: {
+-         goto -> bb3;                     // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+-     }
+- 
+-     bb3: {
++         StorageLive(_3);                 // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
++         _3 = move _2;                    // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
++         StorageDead(_3);                 // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
           return;                          // scope 0 at $DIR/matches_reduce_branches.rs:11:2: 11:2
       }
   }
diff --git a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.64bit.diff b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.64bit.diff
index 6ee8e6b7748..9f0db1db1b2 100644
--- a/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.64bit.diff
+++ b/src/test/mir-opt/matches_reduce_branches.foo.MatchBranchSimplification.64bit.diff
@@ -5,22 +5,25 @@
       debug bar => _1;                     // in scope 0 at $DIR/matches_reduce_branches.rs:7:8: 7:11
       let mut _0: ();                      // return place in scope 0 at $DIR/matches_reduce_branches.rs:7:25: 7:25
       let mut _2: isize;                   // in scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
++     let mut _3: isize;                   // in scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
   
       bb0: {
           _2 = discriminant(_1);           // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-          switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-      }
-  
-      bb1: {
-          _0 = const ();                   // scope 0 at $DIR/matches_reduce_branches.rs:10:6: 10:6
-          goto -> bb3;                     // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
-      }
-  
-      bb2: {
-          goto -> bb3;                     // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-      }
-  
-      bb3: {
+-         switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
+-     }
+- 
+-     bb1: {
+-         goto -> bb3;                     // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
+-     }
+- 
+-     bb2: {
+-         goto -> bb3;                     // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+-     }
+- 
+-     bb3: {
++         StorageLive(_3);                 // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
++         _3 = move _2;                    // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
++         StorageDead(_3);                 // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
           return;                          // scope 0 at $DIR/matches_reduce_branches.rs:11:2: 11:2
       }
   }
diff --git a/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.32bit.mir b/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.32bit.mir
index 8ec09ce8665..e3b318c949f 100644
--- a/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.32bit.mir
+++ b/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.32bit.mir
@@ -3,19 +3,8 @@
 fn foo(_1: Option<()>) -> () {
     debug bar => _1;                     // in scope 0 at $DIR/matches_reduce_branches.rs:7:8: 7:11
     let mut _0: ();                      // return place in scope 0 at $DIR/matches_reduce_branches.rs:7:25: 7:25
-    let mut _2: isize;                   // in scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
 
     bb0: {
-        _2 = discriminant(_1);           // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-        switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-    }
-
-    bb1: {
-        _0 = const ();                   // scope 0 at $DIR/matches_reduce_branches.rs:10:6: 10:6
-        return;                          // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
-    }
-
-    bb2: {
-        return;                          // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/matches_reduce_branches.rs:11:2: 11:2
     }
 }
diff --git a/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.64bit.mir b/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.64bit.mir
index 8ec09ce8665..e3b318c949f 100644
--- a/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.64bit.mir
+++ b/src/test/mir-opt/matches_reduce_branches.foo.PreCodegen.before.64bit.mir
@@ -3,19 +3,8 @@
 fn foo(_1: Option<()>) -> () {
     debug bar => _1;                     // in scope 0 at $DIR/matches_reduce_branches.rs:7:8: 7:11
     let mut _0: ();                      // return place in scope 0 at $DIR/matches_reduce_branches.rs:7:25: 7:25
-    let mut _2: isize;                   // in scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
 
     bb0: {
-        _2 = discriminant(_1);           // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-        switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:8:22: 8:26
-    }
-
-    bb1: {
-        _0 = const ();                   // scope 0 at $DIR/matches_reduce_branches.rs:10:6: 10:6
-        return;                          // scope 0 at $DIR/matches_reduce_branches.rs:8:5: 10:6
-    }
-
-    bb2: {
-        return;                          // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/matches_reduce_branches.rs:11:2: 11:2
     }
 }
diff --git a/src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff b/src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff
index fb25cb90021..3dd526cfbc5 100644
--- a/src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff
+++ b/src/test/mir-opt/multiple_return_terminators.test.MultipleReturnTerminators.diff
@@ -13,12 +13,10 @@
       }
   
       bb1: {
-          _0 = const ();                   // scope 0 at $DIR/multiple_return_terminators.rs:5:10: 7:6
           goto -> bb3;                     // scope 0 at $DIR/multiple_return_terminators.rs:5:5: 9:6
       }
   
       bb2: {
-          _0 = const ();                   // scope 0 at $DIR/multiple_return_terminators.rs:7:12: 9:6
           goto -> bb3;                     // scope 0 at $DIR/multiple_return_terminators.rs:5:5: 9:6
       }
   
diff --git a/src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff b/src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
index e55ee287ba3..2fc64fa8f52 100644
--- a/src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
+++ b/src/test/mir-opt/remove_unneeded_drops.cannot_opt_generic.RemoveUnneededDrops.diff
@@ -14,7 +14,6 @@
           StorageLive(_2);                 // scope 0 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
           StorageLive(_3);                 // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
           _3 = move _1;                    // scope 0 at $DIR/remove_unneeded_drops.rs:21:10: 21:11
-          _2 = const ();                   // scope 1 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
           drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $DIR/remove_unneeded_drops.rs:21:5: 21:12
       }
   
diff --git a/src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff b/src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
index e5ad8f1ac75..18fdac1bc00 100644
--- a/src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
+++ b/src/test/mir-opt/remove_unneeded_drops.dont_opt.RemoveUnneededDrops.diff
@@ -14,7 +14,6 @@
           StorageLive(_2);                 // scope 0 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
           StorageLive(_3);                 // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
           _3 = move _1;                    // scope 0 at $DIR/remove_unneeded_drops.rs:9:10: 9:11
-          _2 = const ();                   // scope 1 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
           drop(_3) -> [return: bb2, unwind: bb1]; // scope 1 at $DIR/remove_unneeded_drops.rs:9:5: 9:12
       }
   
diff --git a/src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff b/src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
index bddf0e21039..1eb3d736765 100644
--- a/src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
+++ b/src/test/mir-opt/remove_unneeded_drops.opt.RemoveUnneededDrops.diff
@@ -14,7 +14,6 @@
           StorageLive(_2);                 // scope 0 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
           StorageLive(_3);                 // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
           _3 = _1;                         // scope 0 at $DIR/remove_unneeded_drops.rs:4:10: 4:11
-          _2 = const ();                   // scope 1 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
 -         drop(_3) -> bb1;                 // scope 1 at $DIR/remove_unneeded_drops.rs:4:5: 4:12
 -     }
 - 
diff --git a/src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff b/src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
index 87fb8a295c6..9b8a50e8541 100644
--- a/src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
+++ b/src/test/mir-opt/remove_unneeded_drops.opt_generic_copy.RemoveUnneededDrops.diff
@@ -14,7 +14,6 @@
           StorageLive(_2);                 // scope 0 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
           StorageLive(_3);                 // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
           _3 = _1;                         // scope 0 at $DIR/remove_unneeded_drops.rs:14:10: 14:11
-          _2 = const ();                   // scope 1 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
 -         drop(_3) -> bb1;                 // scope 1 at $DIR/remove_unneeded_drops.rs:14:5: 14:12
 -     }
 - 
diff --git a/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff
index f1718c5752c..ff9e2671adc 100644
--- a/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff
@@ -25,7 +25,7 @@
 -         StorageDead(_3);                 // scope 1 at $DIR/simplify-locals.rs:16:25: 16:26
 -         StorageDead(_4);                 // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27
 -         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals.rs:16:26: 16:27
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:13:8: 17:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:13:8: 17:2
           StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:17:1: 17:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:17:2: 17:2
       }
diff --git a/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff
index 76bf175d073..caa2a17700b 100644
--- a/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff
@@ -11,7 +11,7 @@
 -         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:22:13: 22:17
 -         discriminant(_1) = 0;            // scope 0 at $DIR/simplify-locals.rs:22:13: 22:17
 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:22:17: 22:18
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:20:9: 23:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:20:9: 23:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:23:2: 23:2
       }
   }
diff --git a/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff
index c06fa09053c..80496d9a42a 100644
--- a/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff
@@ -31,7 +31,7 @@
 -                                          // + literal: Const { ty: E, val: Value(Scalar(0x01)) }
 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:28:25: 28:26
 -         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:28:26: 28:27
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:26:9: 29:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:26:9: 29:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:29:2: 29:2
       }
   }
diff --git a/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff
index 85cf398d316..7d36e1a9928 100644
--- a/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff
@@ -23,7 +23,7 @@
 -         StorageLive(_3);                 // scope 2 at $DIR/simplify-locals.rs:36:13: 36:19
 -         _3 = &mut _1;                    // scope 2 at $DIR/simplify-locals.rs:36:13: 36:19
 -         StorageDead(_3);                 // scope 2 at $DIR/simplify-locals.rs:36:19: 36:20
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:32:8: 37:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:32:8: 37:2
           StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:37:1: 37:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:37:2: 37:2
       }
diff --git a/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff
index 991a0721cca..89275418d68 100644
--- a/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff
@@ -15,7 +15,7 @@
 -         _1 = (*_2);                      // scope 1 at $DIR/simplify-locals.rs:44:14: 44:15
 -         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:44:17: 44:18
 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:44:17: 44:18
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:42:9: 45:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:42:9: 45:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:45:2: 45:2
       }
   }
diff --git a/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff
index 6c9ed96e78f..b2344c871e4 100644
--- a/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff
@@ -15,7 +15,7 @@
 -         _1 = &mut (*_2);                 // scope 1 at $DIR/simplify-locals.rs:50:14: 50:20
 -         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:50:22: 50:23
 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:50:22: 50:23
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:48:9: 51:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:48:9: 51:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:51:2: 51:2
       }
   }
diff --git a/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff
index 2d5fb352f8b..95982f0a9cf 100644
--- a/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff
@@ -19,7 +19,7 @@
 -         StorageDead(_3);                 // scope 0 at $DIR/simplify-locals.rs:56:23: 56:24
 -         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:56:23: 56:24
 -         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:56:23: 56:24
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:54:9: 57:2
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:54:9: 57:2
           return;                          // scope 0 at $DIR/simplify-locals.rs:57:2: 57:2
       }
   }
diff --git a/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
index 70725e5f14f..69da1c7be88 100644
--- a/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
@@ -30,7 +30,7 @@
       }
   
       bb1: {
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:6: 8:6
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals-fixedpoint.rs:8:6: 8:6
           goto -> bb7;                     // scope 0 at $DIR/simplify-locals-fixedpoint.rs:4:5: 8:6
       }
   
@@ -51,12 +51,12 @@
       }
   
       bb4: {
-          _0 = const ();                   // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10
+-         _0 = const ();                   // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:21: 7:10
           goto -> bb6;                     // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
       }
   
       bb5: {
-          _0 = const ();                   // scope 1 at $DIR/simplify-locals-fixedpoint.rs:7:10: 7:10
+-         _0 = const ();                   // scope 1 at $DIR/simplify-locals-fixedpoint.rs:7:10: 7:10
           goto -> bb6;                     // scope 1 at $DIR/simplify-locals-fixedpoint.rs:5:9: 7:10
       }
   
diff --git a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
index 34f8ca870cd..8d6d531bd34 100644
--- a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
@@ -71,8 +71,8 @@
 -         StorageDead(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:34: 16:35
 -         StorageDead(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
 -         StorageDead(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
+-         _0 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
 +         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:16:35: 16:36
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:12:11: 17:2
           return;                          // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:17:2: 17:2
       }
   }
diff --git a/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
index 539ed710719..eeaabb7b988 100644
--- a/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
@@ -13,7 +13,6 @@ fn process_void(_1: *const Void) -> () {
     bb0: {
         StorageLive(_2);                 // scope 0 at $DIR/uninhabited-enum.rs:14:8: 14:14
         _2 = &(*_1);                     // scope 2 at $DIR/uninhabited-enum.rs:14:26: 14:33
-        _0 = const ();                   // scope 0 at $DIR/uninhabited-enum.rs:13:41: 17:2
         StorageDead(_2);                 // scope 0 at $DIR/uninhabited-enum.rs:17:1: 17:2
         return;                          // scope 0 at $DIR/uninhabited-enum.rs:17:2: 17:2
     }
diff --git a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir
index dae0cbb65a4..b6767077d42 100644
--- a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir
+++ b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.32bit.mir
@@ -10,7 +10,6 @@ fn change_loop_body() -> () {
     bb0: {
         StorageLive(_1);                 // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
         _1 = const 0_i32;                // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
-        _0 = const ();                   // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
         StorageDead(_1);                 // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
         return;                          // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
     }
diff --git a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir
index dae0cbb65a4..b6767077d42 100644
--- a/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir
+++ b/src/test/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.64bit.mir
@@ -10,7 +10,6 @@ fn change_loop_body() -> () {
     bb0: {
         StorageLive(_1);                 // scope 0 at $DIR/while_let_loops.rs:6:9: 6:15
         _1 = const 0_i32;                // scope 0 at $DIR/while_let_loops.rs:6:18: 6:19
-        _0 = const ();                   // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
         StorageDead(_1);                 // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
         return;                          // scope 0 at $DIR/while_let_loops.rs:11:2: 11:2
     }
diff --git a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
index 0c034891a80..eb3ab1c31e3 100644
--- a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
+++ b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
@@ -24,7 +24,6 @@ fn while_loop(_1: bool) -> () {
     }
 
     bb2: {
-        _0 = const ();                   // scope 0 at $DIR/while-storage.rs:10:5: 14:6
         goto -> bb7;                     // scope 0 at $DIR/while-storage.rs:10:5: 14:6
     }
 
@@ -44,7 +43,6 @@ fn while_loop(_1: bool) -> () {
     }
 
     bb5: {
-        _0 = const ();                   // scope 0 at $DIR/while-storage.rs:12:13: 12:18
         StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:13:9: 13:10
         goto -> bb7;                     // scope 0 at $DIR/while-storage.rs:1:1: 1:1
     }
diff --git a/src/test/run-make/const_fn_mir/dump.mir b/src/test/run-make/const_fn_mir/dump.mir
index 45d018cf305..724b2630083 100644
--- a/src/test/run-make/const_fn_mir/dump.mir
+++ b/src/test/run-make/const_fn_mir/dump.mir
@@ -12,7 +12,6 @@ fn main() -> () {
     }
 
     bb1: {
-        _0 = const ();                   // scope 0 at main.rs:8:11: 10:2
         return;                          // scope 0 at main.rs:10:2: 10:2
     }
 }