make #[unwind] attribute specify expectations more clearly
You can now choose between the following: - `#[unwind(allowed)]` - `#[unwind(aborts)]` Per rust-lang/rust#48251, the default is `#[unwind(allowed)]`, though I think we should change this eventually.
This commit is contained in:
parent
27a046e933
commit
a47fd3df89
13 changed files with 113 additions and 19 deletions
|
|
@ -19,7 +19,7 @@ extern {
|
|||
fn extern_fn();
|
||||
// CHECK-NOT: Function Attrs: nounwind
|
||||
// CHECK: declare void @unwinding_extern_fn
|
||||
#[unwind]
|
||||
#[unwind(allowed)]
|
||||
fn unwinding_extern_fn();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ use std::io::prelude::*;
|
|||
use std::io;
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
#[unwind(aborts)]
|
||||
extern "C" fn panic_in_ffi() {
|
||||
panic!("Test");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue