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