FileCheck inline_diverging
This commit is contained in:
parent
7ee05d24b5
commit
d8f33ef93d
@ -1,4 +1,3 @@
|
||||
// skip-filecheck
|
||||
// Tests inlining of diverging calls.
|
||||
//
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
@ -7,6 +6,8 @@
|
||||
|
||||
// EMIT_MIR inline_diverging.f.Inline.diff
|
||||
pub fn f() {
|
||||
// CHECK-LABEL: fn f(
|
||||
// CHECK: (inlined sleep)
|
||||
sleep();
|
||||
}
|
||||
|
||||
@ -15,12 +16,17 @@ pub fn g(i: i32) -> u32 {
|
||||
if i > 0 {
|
||||
i as u32
|
||||
} else {
|
||||
// CHECK-LABEL: fn g(
|
||||
// CHECK: (inlined panic)
|
||||
panic();
|
||||
}
|
||||
}
|
||||
|
||||
// EMIT_MIR inline_diverging.h.Inline.diff
|
||||
pub fn h() {
|
||||
// CHECK-LABEL: fn h(
|
||||
// CHECK: (inlined call_twice::<!, fn() -> ! {sleep}>)
|
||||
// CHECK-NOT: inlined
|
||||
call_twice(sleep);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user