2022-11-09 18:03:30 +01:00
|
|
|
// compile-flags: -Zunsound-mir-opts
|
2022-10-15 19:24:02 +02:00
|
|
|
|
2022-10-25 02:27:27 +02:00
|
|
|
// EMIT_MIR inherit_overflow.main.DataflowConstProp.diff
|
2022-10-15 19:24:02 +02: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);
|
|
|
|
}
|