1 error[E0282]: type annotations needed for the closure `fn((), ()) -> std::result::Result<(), _>`
2 --> $DIR/cannot-infer-closure.rs:3:15
5 | ^ cannot infer type of error for `?` operator
7 = note: `?` implicitly converts the error value into a type implementing `From<()>`
8 help: give this closure an explicit return type without `_` placeholders
10 LL | let x = |a: (), b: ()| -> std::result::Result<(), _> {
11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13 error: aborting due to previous error
15 For more information about this error, try `rustc --explain E0282`.