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

// compile-flags: -O

fn main() {
    let x = &(0u32 - 1);
    assert_eq!(*x, u32::max_value())
}