]> git.lizzy.rs Git - rust.git/blob - tests/ui/async-await/issue-70594.stderr
Rollup merge of #106960 - estebank:parse-anon-enums, r=cjgillot
[rust.git] / tests / ui / async-await / issue-70594.stderr
1 error[E0728]: `await` is only allowed inside `async` functions and blocks
2   --> $DIR/issue-70594.rs:4:11
3    |
4 LL | async fn fun() {
5    |          --- this is not `async`
6 LL |     [1; ().await];
7    |           ^^^^^^ only allowed inside `async` functions and blocks
8
9 error[E0744]: `.await` is not allowed in a `const`
10   --> $DIR/issue-70594.rs:4:9
11    |
12 LL |     [1; ().await];
13    |         ^^^^^^^^
14
15 error[E0744]: `.await` is not allowed in a `const`
16   --> $DIR/issue-70594.rs:4:11
17    |
18 LL |     [1; ().await];
19    |           ^^^^^^
20
21 error[E0277]: `()` is not a future
22   --> $DIR/issue-70594.rs:4:11
23    |
24 LL |     [1; ().await];
25    |           ^^^^^^
26    |           |
27    |           `()` is not a future
28    |           help: remove the `.await`
29    |
30    = help: the trait `Future` is not implemented for `()`
31    = note: () must be a future or must implement `IntoFuture` to be awaited
32    = note: required for `()` to implement `IntoFuture`
33
34 error: aborting due to 4 previous errors
35
36 Some errors have detailed explanations: E0277, E0728, E0744.
37 For more information about an error, try `rustc --explain E0277`.