]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.rs
Rollup merge of #104439 - ferrocene:pa-generate-copyright, r=pnkfelix
[rust.git] / src / tools / miri / tests / fail / function_calls / exported_symbol_bad_unwind2.rs
1 //@revisions: extern_block definition both
2 #![feature(rustc_attrs, c_unwind)]
3
4 #[cfg_attr(any(definition, both), rustc_nounwind)]
5 #[no_mangle]
6 extern "C-unwind" fn nounwind() {
7     //~[definition]^ ERROR: abnormal termination: the program aborted execution
8     //~[both]^^ ERROR: abnormal termination: the program aborted execution
9     panic!();
10 }
11
12 fn main() {
13     extern "C-unwind" {
14         #[cfg_attr(any(extern_block, both), rustc_nounwind)]
15         fn nounwind();
16     }
17     unsafe { nounwind() }
18     //~[extern_block]^ ERROR: unwinding past a stack frame that does not allow unwinding
19 }