summaryrefslogtreecommitdiffstats
path: root/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs')
-rw-r--r--src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs b/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
new file mode 100644
index 000000000..6ff5dbda2
--- /dev/null
+++ b/src/test/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
@@ -0,0 +1,12 @@
+// Test that the "C-unwind" ABI is feature-gated, and *can* be used when the
+// `c_unwind` feature gate is enabled.
+
+// check-pass
+
+#![feature(c_unwind)]
+
+extern "C-unwind" fn f() {}
+
+fn main() {
+ f();
+}