]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-70594.rs
Rollup merge of #107061 - compiler-errors:new-solver-new-candidates-3, r=lcnr
[rust.git] / tests / 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: `.await` is not allowed in a `const`
8     //~| error: `()` is not a future
9 }
10
11 fn main() {}