summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/slice_len.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/const_prop/slice_len.rs')
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index 3b551b6b1..0bf442726 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];
}