about summary refs log tree commit diff
path: root/src/test/ui/numbers-arithmetic/promoted_overflow.rs
blob: da59e81ed6bf702595c2629a644e180fdcf6e4a5 (plain)
1
2
3
4
5
6
7
8
9
#![allow(arithmetic_overflow)]

// run-fail
// error-pattern: overflow
// compile-flags: -C overflow-checks=yes

fn main() {
    let x: &'static u32 = &(0u32 - 1);
}