| error[E0282]: type annotations needed for the closure `fn() -> std::result::Result<(), QualifiedError<_>>` |
| --> $DIR/cannot-infer-partial-try-return.rs:19:9 |
| | |
| LL | infallible()?; |
| | ^^^^^^^^^^^^^ cannot infer type of error for `?` operator |
| | |
| = note: `?` implicitly converts the error value into `QualifiedError<_>` using its implementation of `From<Infallible>` |
| help: give this closure an explicit return type without `_` placeholders |
| | |
| LL | let x = || -> std::result::Result<(), QualifiedError<_>> { |
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| |
| error: aborting due to previous error |
| |
| For more information about this error, try `rustc --explain E0282`. |