|
= 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 { || () }