summaryrefslogtreecommitdiffstats
path: root/tests/ui/limits/huge-struct.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/limits/huge-struct.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/limits/huge-struct.rs')
-rw-r--r--tests/ui/limits/huge-struct.rs53
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/ui/limits/huge-struct.rs b/tests/ui/limits/huge-struct.rs
new file mode 100644
index 000000000..02f38d860
--- /dev/null
+++ b/tests/ui/limits/huge-struct.rs
@@ -0,0 +1,53 @@
+// build-fail
+// normalize-stderr-test "S32" -> "SXX"
+// normalize-stderr-test "S1M" -> "SXX"
+// error-pattern: too big for the current
+
+// FIXME https://github.com/rust-lang/rust/issues/59774
+// normalize-stderr-test "thread.*panicked.*Metadata module not compiled.*\n" -> ""
+// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> ""
+
+struct S32<T> {
+ v0: T,
+ v1: T,
+ v2: T,
+ v3: T,
+ v4: T,
+ v5: T,
+ v6: T,
+ v7: T,
+ v8: T,
+ u9: T,
+ v10: T,
+ v11: T,
+ v12: T,
+ v13: T,
+ v14: T,
+ v15: T,
+ v16: T,
+ v17: T,
+ v18: T,
+ v19: T,
+ v20: T,
+ v21: T,
+ v22: T,
+ v23: T,
+ v24: T,
+ u25: T,
+ v26: T,
+ v27: T,
+ v28: T,
+ v29: T,
+ v30: T,
+ v31: T,
+}
+
+struct S1k<T> { val: S32<S32<T>> }
+
+struct S1M<T> { val: S1k<S1k<T>> }
+
+fn main() {
+ let fat: Option<S1M<S1M<S1M<u32>>>> = None;
+ //~^ ERROR are too big for the current architecture
+
+}