summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/dataflow-const-prop/checked.rs
blob: 1c301460f5d6a88dc5d821f8d8eb7b6649a86e11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// unit-test: DataflowConstProp
// compile-flags: -Coverflow-checks=on

// EMIT_MIR checked.main.DataflowConstProp.diff
#[allow(arithmetic_overflow)]
fn main() {
    let a = 1;
    let b = 2;
    let c = a + b;

    let d = i32::MAX;
    let e = d + 1;
}