]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/slice_len.rs
Rollup merge of #107424 - bpeel:clone-into-from-share-code, r=scottmcm
[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 }