2017-06-04 21:31:34 -05:00
|
|
|
fn main() {
|
|
|
|
let v = [0i8; 4];
|
|
|
|
let x = &v as *const i8;
|
2022-07-24 13:28:45 -05:00
|
|
|
let x = unsafe { x.offset(isize::MIN) }; //~ERROR: overflowing in-bounds pointer arithmetic
|
2017-06-04 21:31:34 -05:00
|
|
|
panic!("this should never print: {:?}", x);
|
|
|
|
}
|