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