@@ -1,11 +1,14 @@ |
|
|
1 |
|
-// skip-filecheck |
2 |
1 |
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY |
3 |
2 |
// unit-test: ConstProp |
4 |
3 |
// compile-flags: -Zmir-enable-passes=+Inline |
5 |
4 |
|
|
5 |
+// After inlining, this will contain a `CheckedBinaryOp`. |
|
6 |
+// Propagating the overflow is ok as codegen will just skip emitting the panic. |
6 |
7 |
// EMIT_MIR inherit_overflow.main.ConstProp.diff |
7 |
8 |
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; |
10 |
13 |
let _ = <u8 as std::ops::Add>::add(255, 1); |
11 |
14 |
} |