2019-06-26 07:48:41 -05:00
|
|
|
// edition:2018
|
|
|
|
|
|
|
|
async fn print_dur() {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
async { let (); }.await;
|
|
|
|
//~^ ERROR `await` is only allowed inside `async` functions and blocks
|
|
|
|
async {
|
|
|
|
let task1 = print_dur().await;
|
|
|
|
}.await;
|
2021-11-15 18:57:53 -06:00
|
|
|
//~^ ERROR `await` is only allowed inside `async` functions and blocks
|
2019-06-26 07:48:41 -05:00
|
|
|
(|_| 2333).await;
|
|
|
|
//~^ ERROR `await` is only allowed inside `async` functions and blocks
|
2021-11-15 18:57:53 -06:00
|
|
|
//~| ERROR is not a future
|
2019-06-26 07:48:41 -05:00
|
|
|
}
|