diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff index c2e1288b41e44..7d5d036f46023 100644 --- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff +++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-abort.diff @@ -12,6 +12,9 @@ let mut _7: usize; let mut _8: bool; let mut _9: &[u32; 3]; + scope 1 { + debug a => _1; + } bb0: { StorageLive(_1); @@ -39,8 +42,8 @@ StorageDead(_6); StorageDead(_4); StorageDead(_2); - StorageDead(_1); _0 = const (); + StorageDead(_1); return; } } diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff index 23646c3c9762c..fa4c5a71be50c 100644 --- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff +++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.32bit.panic-unwind.diff @@ -12,6 +12,9 @@ let mut _7: usize; let mut _8: bool; let mut _9: &[u32; 3]; + scope 1 { + debug a => _1; + } bb0: { StorageLive(_1); @@ -39,8 +42,8 @@ StorageDead(_6); StorageDead(_4); StorageDead(_2); - StorageDead(_1); _0 = const (); + StorageDead(_1); return; } } diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff index c2e1288b41e44..7d5d036f46023 100644 --- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff +++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-abort.diff @@ -12,6 +12,9 @@ let mut _7: usize; let mut _8: bool; let mut _9: &[u32; 3]; + scope 1 { + debug a => _1; + } bb0: { StorageLive(_1); @@ -39,8 +42,8 @@ StorageDead(_6); StorageDead(_4); StorageDead(_2); - StorageDead(_1); _0 = const (); + StorageDead(_1); return; } } diff --git a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff index 23646c3c9762c..fa4c5a71be50c 100644 --- a/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff +++ b/tests/mir-opt/const_prop/slice_len.main.ConstProp.64bit.panic-unwind.diff @@ -12,6 +12,9 @@ let mut _7: usize; let mut _8: bool; let mut _9: &[u32; 3]; + scope 1 { + debug a => _1; + } bb0: { StorageLive(_1); @@ -39,8 +42,8 @@ StorageDead(_6); StorageDead(_4); StorageDead(_2); - StorageDead(_1); _0 = const (); + StorageDead(_1); return; } } diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs index 3b551b6b173c7..0bf44272698ad 100644 --- a/tests/mir-opt/const_prop/slice_len.rs +++ b/tests/mir-opt/const_prop/slice_len.rs @@ -1,10 +1,13 @@ -// skip-filecheck -// EMIT_MIR_FOR_EACH_PANIC_STRATEGY // unit-test: ConstProp // compile-flags: -Zmir-enable-passes=+InstSimplify +// EMIT_MIR_FOR_EACH_PANIC_STRATEGY // EMIT_MIR_FOR_EACH_BIT_WIDTH // EMIT_MIR slice_len.main.ConstProp.diff fn main() { - (&[1u32, 2, 3] as &[u32])[1]; + // CHECK-LABEL: fn main( + // CHECK: debug a => [[a:_.*]]; + // CHECK: assert(const true, + // CHECK: [[a]] = const 2_u32; + let a = (&[1u32, 2, 3] as &[u32])[1]; }