2018-05-09 15:54:45 +02:00
|
|
|
//error-pattern: attempt to add with overflow
|
2017-06-04 18:47:31 -07:00
|
|
|
fn main() {
|
|
|
|
let v = [1i8, 2];
|
|
|
|
let x = &v[1] as *const i8;
|
2018-11-26 15:31:53 +01:00
|
|
|
let _val = unsafe { x.offset(isize::min_value()) };
|
2017-06-04 18:47:31 -07:00
|
|
|
}
|