]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/type-alias-impl-trait/issue-63279.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-63279.stderr
index bcc9c57f91ce6c5a0ed8840bad320afdde2ba763..ab39ee74be4421cd4766cc0f6f593951360edb23 100644 (file)
@@ -15,13 +15,17 @@ LL |     || -> Closure { || () }
    |
    = note: expected unit type `()`
                 found closure `[closure@$DIR/issue-63279.rs:8:21: 8:26]`
+help: use parentheses to call this closure
+   |
+LL |     || -> Closure { (|| ())() }
+   |                     +     +++
 
 error[E0308]: mismatched types
   --> $DIR/issue-63279.rs:8:5
    |
 LL | type Closure = impl FnOnce();
    |                ------------- the expected opaque type
-LL | 
+LL |
 LL | fn c() -> Closure {
    |           ------- expected `Closure` because of return type
 LL |     || -> Closure { || () }