1 // revisions: default noopt opt opt_with_overflow_checks
2 //[noopt]compile-flags: -C opt-level=0
3 //[opt]compile-flags: -O
4 //[opt_with_overflow_checks]compile-flags: -C overflow-checks=on -O
14 impl<T: Foo> Foo for Vec<T> {
15 const N: i32 = -i32::MIN + T::N;
16 //~^ ERROR arithmetic operation will overflow