summaryrefslogtreecommitdiffstats
path: root/tests/ui/recursion/recursive-enum.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/recursion/recursive-enum.rs')
-rw-r--r--tests/ui/recursion/recursive-enum.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/recursion/recursive-enum.rs b/tests/ui/recursion/recursive-enum.rs
new file mode 100644
index 000000000..32e707607
--- /dev/null
+++ b/tests/ui/recursion/recursive-enum.rs
@@ -0,0 +1,4 @@
+enum List<T> { Cons(T, List<T>), Nil }
+//~^ ERROR recursive type `List` has infinite size
+
+fn main() {}