fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `main` has invalid return type `Option<()>` 2 --> $DIR/issue-102605.rs:11:14 3 | 4LL | fn main() -> Option<()> { 5 | ^^^^^^^^^^ `main` can only return types that implement `Termination` 6 | 7 = help: consider using `()`, or a `Result` 8 9error[E0308]: mismatched types 10 --> $DIR/issue-102605.rs:13:20 11 | 12LL | convert_result(foo()) 13 | -------------- ^^^^^ expected `Result<(), _>`, found future 14 | | 15 | arguments to this function are incorrect 16 | 17note: calling an async function returns a future 18 --> $DIR/issue-102605.rs:13:20 19 | 20LL | convert_result(foo()) 21 | ^^^^^ 22note: function defined here 23 --> $DIR/issue-102605.rs:7:4 24 | 25LL | fn convert_result<T, E>(r: Result<T, E>) -> Option<T> { 26 | ^^^^^^^^^^^^^^ --------------- 27help: consider `await`ing on the `Future` 28 | 29LL | convert_result(foo().await) 30 | ++++++ 31help: try wrapping the expression in `Err` 32 | 33LL | convert_result(Err(foo())) 34 | ++++ + 35 36error: aborting due to 2 previous errors 37 38Some errors have detailed explanations: E0277, E0308. 39For more information about an error, try `rustc --explain E0277`.