summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/const_prop/slice_len.rs
blob: 8183def0c63dbda29ffd08a43dd70fa1fb8cfcfb (plain)
1
2
3
4
5
6
7
8
// unit-test: ConstProp
// compile-flags: -Zmir-enable-passes=+InstCombine
// EMIT_MIR_FOR_EACH_BIT_WIDTH

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