]> git.lizzy.rs Git - rust.git/blob - src/test/ui/async-await/issue-70594.rs
Rollup merge of #73813 - petrochenkov:restrait, r=davidtwco
[rust.git] / src / test / ui / async-await / issue-70594.rs
1 // edition:2018
2
3 async fn fun() {
4     [1; ().await];
5     //~^ error: `await` is only allowed inside `async` functions and blocks
6     //~| error: `.await` is not allowed in a `const`
7     //~| error: `loop` is not allowed in a `const`
8     //~| error: `.await` is not allowed in a `const`
9     //~| error: `()` is not a future
10 }
11
12 fn main() {}