2019-06-26 13:48:41 +01:00
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-62009-1.rs:6:23
|
2019-06-26 13:48:41 +01:00
|
|
|
|
|
|
|
|
|
LL | fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
| --------- this is not `async`
|
2019-06-26 13:48:41 +01:00
|
|
|
LL | async { let (); }.await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-06-26 13:48:41 +01:00
|
|
|
|
|
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-62009-1.rs:10:7
|
2019-06-26 13:48:41 +01:00
|
|
|
|
|
2021-11-16 00:57:53 +00:00
|
|
|
LL | fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
| --------- this is not `async`
|
2019-06-26 13:48:41 +01:00
|
|
|
...
|
2021-11-16 00:57:53 +00:00
|
|
|
LL | }.await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-06-26 13:48:41 +01:00
|
|
|
|
|
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2023-04-25 18:59:16 +00:00
|
|
|
--> $DIR/issue-62009-1.rs:12:16
|
2019-06-26 13:48:41 +01:00
|
|
|
|
|
|
|
|
|
LL | fn main() {
|
2024-04-11 13:15:34 +00:00
|
|
|
| --------- this is not `async`
|
2019-06-26 13:48:41 +01:00
|
|
|
...
|
|
|
|
|
LL | (|_| 2333).await;
|
2023-04-25 18:59:16 +00:00
|
|
|
| ^^^^^ only allowed inside `async` functions and blocks
|
2019-06-26 13:48:41 +01:00
|
|
|
|
2023-11-28 19:06:23 +00:00
|
|
|
error: aborting due to 3 previous errors
|
2019-06-26 13:48:41 +01:00
|
|
|
|
2023-11-28 19:06:23 +00:00
|
|
|
For more information about this error, try `rustc --explain E0728`.
|