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:6: 12:9]` is not a future
28 --> $DIR/issue-62009-1.rs:12:15
30 LL | (|_| 2333).await;
33 | `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]` is not a future
34 | help: remove the `.await`
36 = help: the trait `Future` is not implemented for closure `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]`
37 = note: [closure@$DIR/issue-62009-1.rs:12:6: 12:9] must be a future or must implement `IntoFuture` to be awaited
38 = note: required for `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]` to implement `IntoFuture`
40 error: aborting due to 4 previous errors
42 Some errors have detailed explanations: E0277, E0728.
43 For more information about an error, try `rustc --explain E0277`.