rust/tests/fail/function_calls/exported_symbol_bad_unwind1.rs

16 lines
285 B
Rust
Raw Normal View History

2022-07-08 11:08:32 -05:00
//@compile-flags: -Zmiri-disable-abi-check
2021-04-15 16:19:23 -05:00
#![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
2021-04-15 16:19:23 -05:00
}