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