summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/unwind-abort.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/consts/unwind-abort.rs')
-rw-r--r--tests/ui/consts/unwind-abort.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/consts/unwind-abort.rs b/tests/ui/consts/unwind-abort.rs
new file mode 100644
index 000000000..6c94fc7b9
--- /dev/null
+++ b/tests/ui/consts/unwind-abort.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+#![feature(c_unwind, const_extern_fn)]
+
+// We don't unwind in const-eval anyways.
+const extern "C" fn foo() {
+ panic!()
+}
+
+const fn bar() {
+ foo();
+}
+
+fn main() {
+ bar();
+}