summaryrefslogtreecommitdiffstats
path: root/tests/ui/structs-enums/struct-rec/issue-74224.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/structs-enums/struct-rec/issue-74224.rs')
-rw-r--r--tests/ui/structs-enums/struct-rec/issue-74224.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/structs-enums/struct-rec/issue-74224.rs b/tests/ui/structs-enums/struct-rec/issue-74224.rs
new file mode 100644
index 000000000..f3b72c5df
--- /dev/null
+++ b/tests/ui/structs-enums/struct-rec/issue-74224.rs
@@ -0,0 +1,11 @@
+struct A<T> {
+//~^ ERROR recursive type `A` has infinite size
+ x: T,
+ y: A<A<T>>,
+}
+
+struct B {
+ z: A<usize>
+}
+
+fn main() {}