]>
git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issues/issue-62009.rs
3 #![feature(async_await)]
5 async
fn print_dur() {}
8 async { let (); }
.await
;
9 //~^ ERROR `await` is only allowed inside `async` functions and blocks
11 //~^ ERROR `await` is only allowed inside `async` functions and blocks
12 let task1
= print_dur().await
;
14 (async
|| 2333)().await
;
15 //~^ ERROR `await` is only allowed inside `async` functions and blocks
17 //~^ ERROR `await` is only allowed inside `async` functions and blocks