]> 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 ba1e842c610baa51c17ad21be9175ee3ce8bc1e4..9b50ddec12a44aa093939714b8f9d474e5e35af0 100644 (file)
@@ -5,9 +5,16 @@ LL | struct S {
    | ^^^^^^^^ recursive type has infinite size
 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