]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs
Rollup merge of #107706 - tgross35:atomic-as-mut-ptr, r=m-ou-se
[rust.git] / tests / ui / typeck / issue-90027-async-fn-return-suggestion.rs
1 // edition:2018
2
3 async fn hello() { //~ HELP try adding a return type
4     0
5     //~^ ERROR [E0308]
6 }
7
8 async fn world() -> () {
9     0
10     //~^ ERROR [E0308]
11 }
12
13 async fn suggest_await_in_async_fn_return() {
14     hello()
15     //~^ ERROR mismatched types [E0308]
16     //~| HELP consider `await`ing on the `Future`
17     //~| HELP consider using a semicolon here
18     //~| SUGGESTION .await
19 }
20
21 fn main() {}