about summary refs log tree commit diff
path: root/src/test/compile-fail/unwind-tables-panic-required.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/unwind-tables-panic-required.rs')
-rw-r--r--src/test/compile-fail/unwind-tables-panic-required.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/compile-fail/unwind-tables-panic-required.rs b/src/test/compile-fail/unwind-tables-panic-required.rs
new file mode 100644
index 00000000000..314d9e778d5
--- /dev/null
+++ b/src/test/compile-fail/unwind-tables-panic-required.rs
@@ -0,0 +1,10 @@
+// Tests that the compiler errors if the user tries to turn off unwind tables
+// when they are required.
+//
+// compile-flags: -C panic=unwind -C force-unwind-tables=no
+// ignore-tidy-linelength
+//
+// error-pattern: panic=unwind requires unwind tables, they cannot be disabled with `-C force-unwind-tables=no`.
+
+pub fn main() {
+}