summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-17431-5.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/issues/issue-17431-5.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-17431-5.rs b/src/test/ui/issues/issue-17431-5.rs
new file mode 100644
index 000000000..0fd6ee611
--- /dev/null
+++ b/src/test/ui/issues/issue-17431-5.rs
@@ -0,0 +1,11 @@
+use std::marker;
+
+struct Foo { foo: Bar<Foo> }
+
+struct Bar<T> { x: Bar<Foo> , marker: marker::PhantomData<T> }
+//~^ ERROR recursive type `Bar` has infinite size
+
+impl Foo { fn foo(&self) {} }
+
+fn main() {
+}