]> git.proxmox.com Git - rustc.git/blob - tests/mir-opt/const_prop/inherit_overflow.rs
4e905d00d4d92339a53affb0728c2a153d414a2a
[rustc.git] / tests / mir-opt / const_prop / inherit_overflow.rs
1 // ignore-wasm32 compiled with panic=abort by default
2 // unit-test: ConstProp
3 // compile-flags: -Zmir-enable-passes=+Inline
4
5 // EMIT_MIR inherit_overflow.main.ConstProp.diff
6 fn main() {
7 // After inlining, this will contain a `CheckedBinaryOp`.
8 // Propagating the overflow is ok as codegen will just skip emitting the panic.
9 let _ = <u8 as std::ops::Add>::add(255, 1);
10 }