rust/tests/run-pass/panic/overflowing-rsh-2.rs
2020-02-21 10:33:00 +01:00

8 lines
258 B
Rust

// ignore-windows: Unwind panicking does not currently work on Windows
#![allow(arithmetic_overflow)]
fn main() {
// Make sure we catch overflows that would be hidden by first casting the RHS to u32
let _n = 1i64 >> (u32::max_value() as i64 + 1);
}