2019-08-13 18:41:43 -05:00
|
|
|
error[E0282]: type annotations needed for the closure `fn((), ()) -> std::result::Result<(), _>`
|
2019-08-12 18:50:46 -05:00
|
|
|
--> $DIR/cannot-infer-closure.rs:3:9
|
|
|
|
|
|
2019-08-12 20:12:19 -05:00
|
|
|
LL | Err(a)?;
|
|
|
|
| ^^^^^^^ cannot infer type
|
2019-08-13 18:41:43 -05:00
|
|
|
help: give this closure an explicit return type without `_` placeholders
|
|
|
|
|
|
|
|
|
LL | let x = |a: (), b: ()| -> std::result::Result<(), _> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2019-08-12 18:50:46 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0282`.
|