]> git.proxmox.com Git - rustc.git/blame_incremental - src/test/ui/async-await/issues/issue-62009-1.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / test / ui / async-await / issues / issue-62009-1.rs
... / ...
CommitLineData
1// edition:2018
2// ignore-x86 FIXME: missing sysroot spans (#53081)
3
4async fn print_dur() {}
5
6fn 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}