]> git.lizzy.rs Git - rust.git/blob - tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
Auto merge of #107529 - Zoxc:inline-tweak-profile, r=cjgillot
[rust.git] / tests / mir-opt / const_prop / bad_op_unsafe_oob_for_slices.rs
1 // EMIT_MIR_FOR_EACH_BIT_WIDTH
2 // EMIT_MIR bad_op_unsafe_oob_for_slices.main.ConstProp.diff
3 #[allow(unconditional_panic)]
4 fn main() {
5     let a: *const [_] = &[1, 2, 3];
6     unsafe {
7         let _b = (*a)[3];
8     }
9 }