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`.
