summary refs log tree commit diff
path: root/src/test/run-fail/promoted_overflow.rs
blob: 3c42da4b1d8ed43dc787499a2592b5b2748b4e18 (plain)
1
2
3
4
5
6
7
8
#![allow(arithmetic_overflow)]

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

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