]> git.proxmox.com Git - rustc.git/blob - src/test/ui/inference/cannot-infer-closure.stderr
New upstream version 1.39.0+dfsg1
[rustc.git] / src / test / ui / inference / cannot-infer-closure.stderr
1 error[E0282]: type annotations needed for the closure `fn((), ()) -> std::result::Result<(), _>`
2 --> $DIR/cannot-infer-closure.rs:3:9
3 |
4 LL | Err(a)?;
5 | ^^^^^^^ cannot infer type
6 help: give this closure an explicit return type without `_` placeholders
7 |
8 LL | let x = |a: (), b: ()| -> std::result::Result<(), _> {
9 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
11 error: aborting due to previous error
12
13 For more information about this error, try `rustc --explain E0282`.