-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
// skip-filecheck | ||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY | ||
// unit-test: ConstProp | ||
// compile-flags: -Zmir-enable-passes=+Inline | ||
|
||
// After inlining, this will contain a `CheckedBinaryOp`. | ||
// Propagating the overflow is ok as codegen will just skip emitting the panic. | ||
// EMIT_MIR inherit_overflow.main.ConstProp.diff | ||
fn main() { | ||
// After inlining, this will contain a `CheckedBinaryOp`. | ||
// Propagating the overflow is ok as codegen will just skip emitting the panic. | ||
// CHECK-LABEL: fn main( | ||
// CHECK: {{_.*}} = const (0_u8, true); | ||
// CHECK: assert(!const true, | ||
// CHECK: {{_.*}} = const 0_u8; | ||
let _ = <u8 as std::ops::Add>::add(255, 1); | ||
} |