rust/tests/compile-fail/function_calls/exported_symbol_bad_unwind1.rs

16 lines
284 B
Rust
Raw Normal View History

2021-04-15 16:19:23 -05:00
// compile-flags: -Zmiri-disable-abi-check
#![feature(c_unwind)]
#[no_mangle]
extern "C-unwind" fn unwind() {
panic!();
}
fn main() {
extern "C" {
fn unwind();
}
unsafe { unwind() }
//~^ ERROR unwinding past a stack frame that does not allow unwinding
}