rust/tests/ui/async-await/issue-70594.rs
2023-01-11 09:32:08 +00:00

12 lines
288 B
Rust

// 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() {}