fork/rust
git clone https://git.julia.blue/fork/rust
49cae55760d
1.44.0
1error[E0728]: `await` is only allowed inside `async` functions and blocks 2 --> $DIR/issue-62009-1.rs:6:5 3 | 4LL | fn main() { 5 | ---- this is not `async` 6LL | async { let (); }.await; 7 | ^^^^^^^^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks 8 9error[E0728]: `await` is only allowed inside `async` functions and blocks 10 --> $DIR/issue-62009-1.rs:8:5 11 | 12LL | fn main() { 13 | ---- this is not `async` 14... 15LL | / async { 16LL | | 17LL | | let task1 = print_dur().await; 18LL | | }.await; 19 | |___________^ only allowed inside `async` functions and blocks 20 21error[E0728]: `await` is only allowed inside `async` functions and blocks 22 --> $DIR/issue-62009-1.rs:12:5 23 | 24LL | fn main() { 25 | ---- this is not `async` 26... 27LL | (|_| 2333).await; 28 | ^^^^^^^^^^^^^^^^ only allowed inside `async` functions and blocks 29 30error[E0277]: the trait bound `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]: std::future::Future` is not satisfied 31 --> $DIR/issue-62009-1.rs:12:5 32 | 33LL | (|_| 2333).await; 34 | ^^^^^^^^^^^^^^^^ the trait `std::future::Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` 35 | 36 = note: required by `std::future::Future::poll` 37 38error: aborting due to 4 previous errors 39 40Some errors have detailed explanations: E0277, E0728. 41For more information about an error, try `rustc --explain E0277`.