rust/tests/ui/async-await/issues/issue-62009-2.rs

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

11 lines
189 B
Rust
Raw Permalink Normal View History

//@ edition:2018
2019-08-01 20:45:58 -05:00
#![feature(async_closure)]
async fn print_dur() {}
fn main() {
(async || 2333)().await;
//~^ ERROR `await` is only allowed inside `async` functions and blocks
}