]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/occurs-check-2.stderr
move an `assert!` to the right place
[rust.git] / src / test / ui / occurs-check-2.stderr
index dcbfc81b4d51928f25c43cf3f06c4dd1434002fc..b68c3fa5bcc9c478240e2e8af4260a3867765f4e 100644 (file)
@@ -2,9 +2,12 @@ error[E0308]: mismatched types
   --> $DIR/occurs-check-2.rs:7:9
    |
 LL |     f = Box::new(g);
-   |         ^^^^^^^^^^^- help: try using a conversion method: `.to_string()`
-   |         |
-   |         cyclic type of infinite size
+   |         ^^^^^^^^^^^ cyclic type of infinite size
+   |
+help: consider unboxing the value
+   |
+LL |     f = *Box::new(g);
+   |         +
 
 error: aborting due to previous error