]> git.lizzy.rs Git - rust.git/blob - tests/compile-fail/ptr_offset_overflow.rs
Auto merge of #1308 - RalfJung:miri, r=RalfJung
[rust.git] / tests / compile-fail / ptr_offset_overflow.rs
1 //error-pattern: overflowing in-bounds pointer arithmetic
2 fn main() {
3     let v = [1i8, 2];
4     let x = &v[1] as *const i8;
5     let _val = unsafe { x.offset(isize::MIN) };
6 }