7 lines
209 B
Rust
7 lines
209 B
Rust
fn main() {
|
|
let v = [0i8; 4];
|
|
let x = &v as *const i8;
|
|
let x = unsafe { x.offset(isize::MIN) }; //~ERROR: overflowing in-bounds pointer arithmetic
|
|
panic!("this should never print: {:?}", x);
|
|
}
|