]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issues/issue-62009-1.rs
Rollup merge of #71627 - ldm0:autoderefarg, r=Dylan-DPC
[rust.git] / src / test / ui / async-await / issues / issue-62009-1.rs
1 // edition:2018
2
3 async fn print_dur() {}
4
5 fn main() {
6     async { let (); }.await;
7     //~^ ERROR `await` is only allowed inside `async` functions and blocks
8     async {
9     //~^ ERROR `await` is only allowed inside `async` functions and blocks
10         let task1 = print_dur().await;
11     }.await;
12     (|_| 2333).await;
13     //~^ ERROR `await` is only allowed inside `async` functions and blocks
14     //~^^ ERROR
15 }