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

7 lines
179 B
Rust
Raw Normal View History

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
let _n = 1i64 >> (u32::MAX as i64 + 1);
}