summaryrefslogtreecommitdiffstats
path: root/tests/ui/fn/expr-fn-panic.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/fn/expr-fn-panic.rs')
-rw-r--r--tests/ui/fn/expr-fn-panic.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/fn/expr-fn-panic.rs b/tests/ui/fn/expr-fn-panic.rs
new file mode 100644
index 000000000..123b57f97
--- /dev/null
+++ b/tests/ui/fn/expr-fn-panic.rs
@@ -0,0 +1,11 @@
+// run-fail
+// error-pattern:explicit panic
+// ignore-emscripten no processes
+
+fn f() -> ! {
+ panic!()
+}
+
+fn main() {
+ f();
+}