We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a1a8f33 commit 63af27fCopy full SHA for 63af27f
src/test/codegen/nounwind-extern.rs
src/test/codegen/unwind-extern-exports.rs
@@ -0,0 +1,19 @@
1
+// compile-flags: -C opt-level=0
2
+
3
+#![crate_type = "lib"]
4
+#![feature(unwind_attributes)]
5
6
+// Make sure these all do *not* get the attribute.
7
+// We disable optimizations to prevent LLVM from infering the attribute.
8
+// CHECK-NOT: nounwind
9
10
+// "C" ABI
11
+// pub extern fn foo() {} // FIXME right now we don't abort-on-panic but add `nounwind` nevertheless
12
+#[unwind(allowed)]
13
+pub extern fn foo_allowed() {}
14
15
+// "Rust" ABI (`extrn "Rust"` could be removed as all `fn` get it implicitly; we leave it
16
+// in for clarity.)
17
+pub extern "Rust" fn bar() {}
18
19
+pub extern "Rust" fn bar_allowed() {}
0 commit comments