summaryrefslogtreecommitdiffstats
path: root/tests/ui/async-await/issue-70594.rs
blob: 9e7c5847b3b2ee846aff7bea81d414cef29f0725 (plain)
1
2
3
4
5
6
7
8
9
10
11
// edition:2018

async fn fun() {
    [1; ().await];
    //~^ error: `await` is only allowed inside `async` functions and blocks
    //~| error: `.await` is not allowed in a `const`
    //~| error: `.await` is not allowed in a `const`
    //~| error: `()` is not a future
}

fn main() {}