]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/suggestions/suggest-closure-return-type-2.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / suggestions / suggest-closure-return-type-2.stderr
index a7f5b58c4da768f439c4b754101ef59e1df138cc..f368e7de467ca94847bf76348afb3d36604b783b 100644 (file)
@@ -1,13 +1,13 @@
-error[E0282]: type annotations needed for the closure `fn() -> [_; 0]`
-  --> $DIR/suggest-closure-return-type-2.rs:2:19
+error[E0282]: type annotations needed for `[_; 0]`
+  --> $DIR/suggest-closure-return-type-2.rs:4:18
    |
-LL |     let _v = || { [] };
-   |                   ^^ cannot infer type
+LL |     unbound_drop(|| { [] })
+   |                  ^^
    |
-help: give this closure an explicit return type without `_` placeholders
+help: try giving this closure an explicit return type
    |
-LL |     let _v = || -> [_; 0] { [] };
-   |                 +++++++++
+LL |     unbound_drop(|| -> [_; 0] { [] })
+   |                     +++++++++
 
 error: aborting due to previous error