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