rust/tests/mir-opt/c_unwind_terminate.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

26 lines
452 B
Rust
Raw Normal View History

2024-08-28 17:00:21 +00:00
//@ needs-unwind
struct Noise;
impl Drop for Noise {
fn drop(&mut self) {
eprintln!("Noisy Drop");
}
}
fn panic() {
panic!();
}
// EMIT_MIR c_unwind_terminate.test.AbortUnwindingCalls.after.mir
extern "C" fn test() {
// CHECK-LABEL: fn test(
// CHECK: drop
// CHECK-SAME: unwind: [[unwind:bb.*]]]
// CHECK: [[unwind]] (cleanup)
// CHECK-NEXT: terminate(abi)
let _val = Noise;
panic();
}
fn main() {}