summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs
blob: 8ccb15ca48a4fc8777a50d9c0d66e63c0de626b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// edition:2018

async fn hello() { //~ HELP try adding a return type
    0
    //~^ ERROR [E0308]
}

async fn world() -> () {
    0
    //~^ ERROR [E0308]
}

async fn suggest_await_in_async_fn_return() {
    hello()
    //~^ ERROR mismatched types [E0308]
    //~| HELP consider `await`ing on the `Future`
    //~| HELP consider using a semicolon here
    //~| SUGGESTION .await
}

fn main() {}