rust/tests/run-pass/panic/overflowing-rsh-2.rs

8 lines
258 B
Rust
Raw Normal View History

2019-11-29 06:18:54 -06:00
// ignore-windows: Unwind panicking does not currently work on Windows
2020-02-21 03:28:24 -06:00
#![allow(arithmetic_overflow)]
fn main() {
// Make sure we catch overflows that would be hidden by first casting the RHS to u32
2019-11-29 06:18:54 -06:00
let _n = 1i64 >> (u32::max_value() as i64 + 1);
}