diff options
Diffstat (limited to 'tests/ui/structs-enums/struct-rec/issue-17431-4.stderr')
-rw-r--r-- | tests/ui/structs-enums/struct-rec/issue-17431-4.stderr | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr b/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr new file mode 100644 index 000000000..3d141e44b --- /dev/null +++ b/tests/ui/structs-enums/struct-rec/issue-17431-4.stderr @@ -0,0 +1,14 @@ +error[E0072]: recursive type `Foo` has infinite size + --> $DIR/issue-17431-4.rs:3:1 + | +LL | struct Foo<T> { foo: Option<Option<Foo<T>>>, marker: marker::PhantomData<T> } + | ^^^^^^^^^^^^^ ------ recursive without indirection + | +help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle + | +LL | struct Foo<T> { foo: Option<Option<Box<Foo<T>>>>, marker: marker::PhantomData<T> } + | ++++ + + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0072`. |