about summary refs log tree commit diff
path: root/tests/ui/panic-runtime/unwind-rec2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/panic-runtime/unwind-rec2.rs')
-rw-r--r--tests/ui/panic-runtime/unwind-rec2.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/panic-runtime/unwind-rec2.rs b/tests/ui/panic-runtime/unwind-rec2.rs
new file mode 100644
index 00000000000..a130f9e879f
--- /dev/null
+++ b/tests/ui/panic-runtime/unwind-rec2.rs
@@ -0,0 +1,23 @@
+// run-fail
+// error-pattern:explicit panic
+// ignore-emscripten no processes
+
+fn build1() -> Vec<isize> {
+    vec![0, 0, 0, 0, 0, 0, 0]
+}
+
+fn build2() -> Vec<isize> {
+    panic!();
+}
+
+struct Blk {
+    node: Vec<isize>,
+    span: Vec<isize>,
+}
+
+fn main() {
+    let _blk = Blk {
+        node: build1(),
+        span: build2(),
+    };
+}