diff options
Diffstat (limited to 'tests/ui/sized-cycle-note.rs')
-rw-r--r-- | tests/ui/sized-cycle-note.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/sized-cycle-note.rs b/tests/ui/sized-cycle-note.rs new file mode 100644 index 000000000..766a5fa0d --- /dev/null +++ b/tests/ui/sized-cycle-note.rs @@ -0,0 +1,7 @@ +struct Baz { q: Option<Foo> } +//~^ ERROR recursive types `Baz` and `Foo` have infinite size +struct Foo { q: Option<Baz> } + +impl Foo { fn bar(&self) {} } + +fn main() {} |