]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/dangling_pointers/out_of_bounds_read2.rs
Rollup merge of #102036 - Patiga:remove-io-errorkind-other-use-in-std, r=Mark-Simulacrum
[rust.git] / src / tools / miri / tests / fail / dangling_pointers / out_of_bounds_read2.rs
1 fn main() {
2     let v: Vec<u8> = vec![1, 2];
3     let x = unsafe { *v.as_ptr().wrapping_offset(5) }; //~ ERROR: out-of-bounds
4     panic!("this should never print: {}", x);
5 }