summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/slice_len.rs
blob: 9821d1b1e9220f251f8276e8d7482e37321b2b80 (plain)
1
2
3
4
5
6
7
8
9
// ignore-wasm32 compiled with panic=abort by default
// unit-test: ConstProp
// compile-flags: -Zmir-enable-passes=+InstSimplify
// EMIT_MIR_FOR_EACH_BIT_WIDTH

// EMIT_MIR slice_len.main.ConstProp.diff
fn main() {
    (&[1u32, 2, 3] as &[u32])[1];
}