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