2020-03-31 22:41:40 +00:00
|
|
|
error[E0728]: `await` is only allowed inside `async` functions and blocks
|
2021-11-16 22:06:25 +00:00
|
|
|
--> $DIR/issue-70594.rs:4:11
|
2020-03-31 22:41:40 +00:00
|
|
|
|
|
|
|
|
LL | async fn fun() {
|
|
|
|
| --- this is not `async`
|
|
|
|
LL | [1; ().await];
|
2021-11-16 22:06:25 +00:00
|
|
|
| ^^^^^^ only allowed inside `async` functions and blocks
|
2020-03-31 22:41:40 +00:00
|
|
|
|
|
|
|
error[E0744]: `.await` is not allowed in a `const`
|
2021-11-16 22:06:25 +00:00
|
|
|
--> $DIR/issue-70594.rs:4:9
|
2020-03-31 22:41:40 +00:00
|
|
|
|
|
|
|
|
LL | [1; ().await];
|
2021-11-16 22:06:25 +00:00
|
|
|
| ^^^^^^^^
|
2020-03-31 22:41:40 +00:00
|
|
|
|
|
|
|
error[E0744]: `.await` is not allowed in a `const`
|
2021-11-16 00:57:53 +00:00
|
|
|
--> $DIR/issue-70594.rs:4:11
|
2020-03-31 22:41:40 +00:00
|
|
|
|
|
|
|
|
LL | [1; ().await];
|
2021-11-16 00:57:53 +00:00
|
|
|
| ^^^^^^
|
2020-03-31 22:41:40 +00:00
|
|
|
|
2021-11-16 00:57:53 +00:00
|
|
|
error[E0277]: `()` is not a future
|
|
|
|
--> $DIR/issue-70594.rs:4:11
|
|
|
|
|
|
|
|
|
LL | [1; ().await];
|
2022-09-12 14:54:25 +00:00
|
|
|
| ^^^^^^
|
|
|
|
| |
|
|
|
|
| `()` is not a future
|
|
|
|
| help: remove the `.await`
|
2021-11-16 00:57:53 +00:00
|
|
|
|
|
|
|
|
= help: the trait `Future` is not implemented for `()`
|
|
|
|
= note: () must be a future or must implement `IntoFuture` to be awaited
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `()` to implement `IntoFuture`
|
2021-11-16 00:57:53 +00:00
|
|
|
|
2021-11-16 22:06:25 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2020-03-31 22:41:40 +00:00
|
|
|
|
2020-06-26 00:43:48 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0728, E0744.
|
2020-03-31 22:41:40 +00:00
|
|
|
For more information about an error, try `rustc --explain E0277`.
|