2019-08-12 18:50:46 -05:00
|
|
|
error[E0282]: type annotations needed for the closure
|
|
|
|
--> $DIR/cannot-infer-closure.rs:3:9
|
|
|
|
|
|
2019-08-12 20:12:19 -05:00
|
|
|
LL | let x = |a: (), b: ()| {
|
2019-08-13 13:24:08 -05:00
|
|
|
| - consider giving `x` a boxed closure type like `Box<dyn Fn((), ()) -> std::result::Result<(), _>>`
|
2019-08-12 20:12:19 -05:00
|
|
|
LL | Err(a)?;
|
|
|
|
| ^^^^^^^ cannot infer type
|
2019-08-12 18:50:46 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0282`.
|