rust/tests/mir-opt/const_prop/array_index.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
284 B
Rust
Raw Normal View History

2022-07-26 19:04:27 +02:00
// unit-test: ConstProp
2023-12-02 20:17:20 +00:00
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
2020-04-04 17:15:01 +00:00
2020-07-27 21:22:43 +02:00
// EMIT_MIR array_index.main.ConstProp.diff
fn main() {
2023-12-02 20:17:20 +00:00
// CHECK-LABEL: fn main(
// CHECK: debug x => [[x:_.*]];
// CHECK: [[x]] = const 2_u32;
let x: u32 = [0, 1, 2, 3][2];
}