rust/tests/ui/async-await/issue-70594.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
288 B
Rust
Raw Normal View History

2020-03-31 17:41:40 -05:00
// 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
2020-03-31 17:41:40 -05:00
}
fn main() {}