mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
12 lines
288 B
Rust
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() {}
|