2022-11-09 11:03:30 -06:00
|
|
|
// compile-flags: -Zunsound-mir-opts
|
2022-10-15 12:24:02 -05:00
|
|
|
|
2022-10-24 19:27:27 -05:00
|
|
|
// EMIT_MIR inherit_overflow.main.DataflowConstProp.diff
|
2022-10-15 12:24:02 -05:00
|
|
|
fn main() {
|
|
|
|
// After inlining, this will contain a `CheckedBinaryOp`. The overflow
|
|
|
|
// must be ignored by the constant propagation to avoid triggering a panic.
|
|
|
|
let _ = <u8 as std::ops::Add>::add(255, 1);
|
|
|
|
}
|