Skip to content

Commit d765e3a

Browse files
committed
Add FileCheck to slice_len.rs
1 parent 3ab1d5d commit d765e3a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1-
// skip-filecheck
21
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
32
// unit-test: DataflowConstProp
43
// compile-flags: -Zmir-enable-passes=+InstSimplify
54
// EMIT_MIR_FOR_EACH_BIT_WIDTH
65

76
// EMIT_MIR slice_len.main.DataflowConstProp.diff
7+
8+
// CHECK-LABEL: fn main
89
fn main() {
10+
// CHECK: debug local => [[local:_[0-9]+]];
11+
// CHECK: debug constant => [[constant:_[0-9]+]];
12+
13+
// CHECK: {{_[0-9]+}} = const 3_usize;
14+
// CHECK: {{_[0-9]+}} = const true;
15+
16+
// CHECK: [[local]] = (*{{_[0-9]+}})[1 of 2];
917
let local = (&[1u32, 2, 3] as &[u32])[1];
1018

1119
const SLICE: &[u32] = &[1, 2, 3];
20+
21+
// CHECK: [[constant]] = (*{{_[0-9]+}})[1 of 2];
1222
let constant = SLICE[1];
1323
}

0 commit comments

Comments
 (0)