summaryrefslogtreecommitdiffstats
path: root/src/test/ui/numbers-arithmetic/promoted_overflow_opt.rs
blob: 4785abbc55470b76b855b4940f82db910fd1efca (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)
}