]>
Commit | Line | Data |
---|---|---|
1 | // edition:2018 | |
2 | // ignore-x86 FIXME: missing sysroot spans (#53081) | |
3 | ||
4 | async fn print_dur() {} | |
5 | ||
6 | fn main() { | |
7 | async { let (); }.await; | |
8 | //~^ ERROR `await` is only allowed inside `async` functions and blocks | |
9 | async { | |
10 | //~^ ERROR `await` is only allowed inside `async` functions and blocks | |
11 | let task1 = print_dur().await; | |
12 | }.await; | |
13 | (|_| 2333).await; | |
14 | //~^ ERROR `await` is only allowed inside `async` functions and blocks | |
15 | //~^^ ERROR | |
16 | } |