summaryrefslogtreecommitdiffstats
path: root/tests/ui/numbers-arithmetic/promoted_overflow_opt.rs
blob: 76279e91308e874e63414564a4301868e42883b7 (plain)
1
2
3
4
5
6
7
8
// run-pass

// compile-flags: -O

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