mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
Add FileCheck to slice_len.rs
This commit is contained in:
parent
3ab1d5d450
commit
d765e3ae1f
@ -1,13 +1,23 @@
|
||||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: DataflowConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+InstSimplify
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
||||
// EMIT_MIR slice_len.main.DataflowConstProp.diff
|
||||
|
||||
// CHECK-LABEL: fn main
|
||||
fn main() {
|
||||
// CHECK: debug local => [[local:_[0-9]+]];
|
||||
// CHECK: debug constant => [[constant:_[0-9]+]];
|
||||
|
||||
// CHECK: {{_[0-9]+}} = const 3_usize;
|
||||
// CHECK: {{_[0-9]+}} = const true;
|
||||
|
||||
// CHECK: [[local]] = (*{{_[0-9]+}})[1 of 2];
|
||||
let local = (&[1u32, 2, 3] as &[u32])[1];
|
||||
|
||||
const SLICE: &[u32] = &[1, 2, 3];
|
||||
|
||||
// CHECK: [[constant]] = (*{{_[0-9]+}})[1 of 2];
|
||||
let constant = SLICE[1];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user