rust/src/test/ui/inference/cannot-infer-closure.stderr

12 lines
414 B
Plaintext
Raw Normal View History

error[E0282]: type annotations needed for the closure
--> $DIR/cannot-infer-closure.rs:3:9
|
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<(), _>>`
LL | Err(a)?;
| ^^^^^^^ cannot infer type
error: aborting due to previous error
For more information about this error, try `rustc --explain E0282`.