summary refs log tree commit diff
path: root/src/test/ui/inference/cannot-infer-closure.stderr
blob: c26c24f1dc573c9fabd5314e9e739b11ada3b27d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
error[E0282]: type annotations needed for the closure `fn((), ()) -> std::result::Result<(), _>`
  --> $DIR/cannot-infer-closure.rs:3:9
   |
LL |         Err(a)?;
   |         ^^^^^^^ cannot infer type
   |
help: give this closure an explicit return type without `_` placeholders
   |
LL |     let x = |a: (), b: ()| -> std::result::Result<(), _> {
   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.