rust/tests/mir-opt/dataflow-const-prop/checked.rs
2023-01-11 09:32:08 +00:00

14 lines
255 B
Rust

// 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;
}