Skip to content

Commit 218d8cc

Browse files
committed
FileCheck inherit_overflow.
1 parent 6086dd6 commit 218d8cc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
// skip-filecheck
21
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
32
// unit-test: ConstProp
43
// compile-flags: -Zmir-enable-passes=+Inline
54

5+
// After inlining, this will contain a `CheckedBinaryOp`.
6+
// Propagating the overflow is ok as codegen will just skip emitting the panic.
67
// EMIT_MIR inherit_overflow.main.ConstProp.diff
78
fn main() {
8-
// After inlining, this will contain a `CheckedBinaryOp`.
9-
// Propagating the overflow is ok as codegen will just skip emitting the panic.
9+
// CHECK-LABEL: fn main(
10+
// CHECK: {{_.*}} = const (0_u8, true);
11+
// CHECK: assert(!const true,
12+
// CHECK: {{_.*}} = const 0_u8;
1013
let _ = <u8 as std::ops::Add>::add(255, 1);
1114
}

0 commit comments

Comments
 (0)