]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/issues/issue-3779.stderr
On recursive ADT, provide indirection structured suggestion
[rust.git] / src / test / ui / issues / issue-3779.stderr
index 3538cb199c3e0bfaf9b7b716107b1c47452223fb..9b50ddec12a44aa093939714b8f9d474e5e35af0 100644 (file)
@@ -3,11 +3,18 @@ error[E0072]: recursive type `S` has infinite size
    |
 LL | struct S {
    | ^^^^^^^^ recursive type has infinite size
-LL |     //~^ ERROR E0072
+LL |
 LL |     element: Option<S>
-   |     ------------------ recursive without indirection
+   |              --------- recursive without indirection
    |
-   = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `S` representable
+help: insert some indirection to make `S` representable
+   |
+LL |     element: Box<Option<S>>
+   |              ^^^^         ^
+LL |     element: Rc<Option<S>>
+   |              ^^^         ^
+LL |     element: &Option<S>
+   |              ^
 
 error: aborting due to previous error