mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
16 lines
309 B
Rust
16 lines
309 B
Rust
// skip-filecheck
|
|
// unit-test: DataflowConstProp
|
|
// compile-flags: -Coverflow-checks=on
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
|
|
|
// 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;
|
|
}
|