blob: f8026fafeb2c4db7ed39c95508d8bcf88f833d8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
error[E0282]: type annotations needed for the closure `fn((), ()) -> Result<(), _>`
--> $DIR/cannot-infer-closure.rs:4:9
|
LL | Ok(b)
| ^^ cannot infer type for type parameter `E` declared on the enum `Result`
|
help: give this closure an explicit return type without `_` placeholders
|
LL | let x = |a: (), b: ()| -> Result<(), _> {
| ++++++++++++++++
error: aborting due to previous error
For more information about this error, try `rustc --explain E0282`.
|