rust/tests/compile-fail/function_calls/exported_symbol_bad_unwind3.rs
2021-05-31 11:15:29 +08:00

17 lines
369 B
Rust

#![feature(unwind_attributes)]
#![feature(c_unwind)] // make sure it doesn't insert abort-on-unwind for the `#[unwind(allowed)]` function
#[unwind(allowed)]
#[no_mangle]
extern "C" fn unwind() {
panic!();
}
fn main() {
extern "C" {
fn unwind();
}
unsafe { unwind() }
//~^ ERROR unwinding past a stack frame that does not allow unwinding
}