rust/tests/ui/async-await/issue-70594.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.1 KiB
Plaintext
Raw Normal View History

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`
--> $DIR/issue-70594.rs:4:11
2020-03-31 17:41:40 -05:00
|
LL | [1; ().await];
| ^^^^^^
2020-03-31 17:41:40 -05:00
error[E0277]: `()` is not a future
--> $DIR/issue-70594.rs:4:11
|
LL | [1; ().await];
| ^^^^^^
| |
| `()` is not a future
| help: remove the `.await`
|
= help: the trait `Future` is not implemented for `()`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required for `()` to implement `IntoFuture`
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`.