rust/src/test/ui/numbers-arithmetic/promoted_overflow.rs
2020-05-06 14:02:55 +09:00

9 lines
166 B
Rust

#![allow(arithmetic_overflow)]
// run-fail
// error-pattern: overflow
// compile-flags: -C overflow-checks=yes
fn main() {
let x: &'static u32 = &(0u32 - 1);
}