]> git.proxmox.com Git - rustc.git/blame - 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
dc9dc135 1// edition:2018
60c5eb7d 2// ignore-x86 FIXME: missing sysroot spans (#53081)
dc9dc135
XL
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;
dc9dc135
XL
13 (|_| 2333).await;
14 //~^ ERROR `await` is only allowed inside `async` functions and blocks
15 //~^^ ERROR
16}