1 error[E0728]: `await` is only allowed inside `async` functions and blocks
2 --> $DIR/issue-62009-1.rs:6:22
5 | ---- this is not `async`
6 LL | async { let (); }.await;
7 | ^^^^^^ only allowed inside `async` functions and blocks
9 error[E0728]: `await` is only allowed inside `async` functions and blocks
10 --> $DIR/issue-62009-1.rs:10:6
13 | ---- this is not `async`
16 | ^^^^^^ only allowed inside `async` functions and blocks
18 error[E0728]: `await` is only allowed inside `async` functions and blocks
19 --> $DIR/issue-62009-1.rs:12:15
22 | ---- this is not `async`
24 LL | (|_| 2333).await;
25 | ^^^^^^ only allowed inside `async` functions and blocks
27 error[E0277]: `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
28 --> $DIR/issue-62009-1.rs:12:15
30 LL | (|_| 2333).await;
31 | ^^^^^^ `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
33 = help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
34 = note: [closure@$DIR/issue-62009-1.rs:12:5: 12:15] must be a future or must implement `IntoFuture` to be awaited
35 = note: required because of the requirements on the impl of `IntoFuture` for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
36 help: remove the `.await`
38 LL - (|_| 2333).await;
42 error: aborting due to 4 previous errors
44 Some errors have detailed explanations: E0277, E0728.
45 For more information about an error, try `rustc --explain E0277`.