]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/slice_len.rs
Auto merge of #107443 - cjgillot:generator-less-query, r=compiler-errors
[rust.git] / tests / mir-opt / const_prop / slice_len.rs
1 // unit-test: ConstProp
2 // compile-flags: -Zmir-enable-passes=+InstCombine
3 // EMIT_MIR_FOR_EACH_BIT_WIDTH
4
5 // EMIT_MIR slice_len.main.ConstProp.diff
6 fn main() {
7     (&[1u32, 2, 3] as &[u32])[1];
8 }