mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
7 lines
170 B
Rust
7 lines
170 B
Rust
//error-pattern: attempt to add with overflow
|
|
fn main() {
|
|
let v = [1i8, 2];
|
|
let x = &v[1] as *const i8;
|
|
let _val = unsafe { x.offset(isize::min_value()) };
|
|
}
|