mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-22 20:47:48 +00:00
7 lines
155 B
Rust
7 lines
155 B
Rust
//error-pattern: overflowing math
|
|
fn main() {
|
|
let v = [1i8, 2];
|
|
let x = &v[1] as *const i8;
|
|
let _ = unsafe { x.offset(isize::min_value()) };
|
|
}
|