]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-unwind-attributes.rs
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_clif-2021-02-01
[rust.git] / src / test / ui / feature-gates / feature-gate-unwind-attributes.rs
1 // ignore-wasm32-bare compiled with panic=abort by default
2 // compile-flags: -C no-prepopulate-passes -Cpasses=name-anon-globals
3
4 #![crate_type = "lib"]
5
6 extern "C" {
7     // CHECK: Function Attrs: nounwind
8     // CHECK-NEXT: declare void @extern_fn
9     fn extern_fn();
10     // CHECK-NOT: Function Attrs: nounwind
11     // CHECK: declare void @unwinding_extern_fn
12     #[unwind(allowed)] //~ ERROR the `#[unwind]` attribute is an experimental feature
13     fn unwinding_extern_fn();
14 }
15
16 pub unsafe fn force_declare() {
17     extern_fn();
18     unwinding_extern_fn();
19 }