diff options
Diffstat (limited to 'tests/ui/infinite/infinite-tag-type-recursion.rs')
-rw-r--r-- | tests/ui/infinite/infinite-tag-type-recursion.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ui/infinite/infinite-tag-type-recursion.rs b/tests/ui/infinite/infinite-tag-type-recursion.rs new file mode 100644 index 000000000..87a9e08dd --- /dev/null +++ b/tests/ui/infinite/infinite-tag-type-recursion.rs @@ -0,0 +1,4 @@ +enum MList { Cons(isize, MList), Nil } +//~^ ERROR recursive type `MList` has infinite size + +fn main() { let a = MList::Cons(10, MList::Cons(11, MList::Nil)); } |