summaryrefslogtreecommitdiffstats
path: root/src/test/ui/panic-runtime/unwind-interleaved.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/panic-runtime/unwind-interleaved.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/panic-runtime/unwind-interleaved.rs b/src/test/ui/panic-runtime/unwind-interleaved.rs
new file mode 100644
index 000000000..a8b3f3493
--- /dev/null
+++ b/src/test/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();
+}