1 error[E0308]: mismatched types
2 --> $DIR/issue-102605.rs:13:20
4 LL | convert_result(foo())
5 | -------------- ^^^^^ expected `Result<(), _>`, found opaque type
7 | arguments to this function are incorrect
9 = note: expected enum `Result<(), _>`
10 found opaque type `impl Future<Output = Result<(), String>>`
11 note: function defined here
12 --> $DIR/issue-102605.rs:7:4
14 LL | fn convert_result<T, E>(r: Result<T, E>) -> Option<T> {
15 | ^^^^^^^^^^^^^^ ---------------
16 help: consider `await`ing on the `Future`
18 LL | convert_result(foo().await)
20 help: try wrapping the expression in `Err`
22 LL | convert_result(Err(foo()))
25 error[E0277]: `main` has invalid return type `Option<()>`
26 --> $DIR/issue-102605.rs:11:14
28 LL | fn main() -> Option<()> {
29 | ^^^^^^^^^^ `main` can only return types that implement `Termination`
31 = help: consider using `()`, or a `Result`
33 error: aborting due to 2 previous errors
35 Some errors have detailed explanations: E0277, E0308.
36 For more information about an error, try `rustc --explain E0277`.