about summary refs log tree commit diff
path: root/tests/ui/panic-runtime/unwind-interleaved.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/panic-runtime/unwind-interleaved.rs')
-rw-r--r--tests/ui/panic-runtime/unwind-interleaved.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/ui/panic-runtime/unwind-interleaved.rs b/tests/ui/panic-runtime/unwind-interleaved.rs
new file mode 100644
index 00000000000..a8b3f349309
--- /dev/null
+++ b/tests/ui/panic-runtime/unwind-interleaved.rs
@@ -0,0 +1,16 @@
+// run-fail
+// error-pattern:explicit panic
+// ignore-emscripten no processes
+
+fn a() {}
+
+fn b() {
+    panic!();
+}
+
+fn main() {
+    let _x = vec![0];
+    a();
+    let _y = vec![0];
+    b();
+}