2020-04-16 01:50:32 -05:00
|
|
|
// build-fail
|
|
|
|
// compile-flags: -C debug-assertions
|
|
|
|
|
2022-09-21 06:05:20 -05:00
|
|
|
#![deny(arithmetic_overflow)]
|
2020-04-16 01:50:32 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _x = 1_i32 << 32;
|
|
|
|
//~^ ERROR: this arithmetic operation will overflow
|
|
|
|
}
|