]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | error[E0728]: `await` is only allowed inside `async` functions and blocks |
2 | --> $DIR/issue-70594.rs:4:9 | |
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 | ||
ba9703b0 XL |
15 | error[E0744]: `.await` is not allowed in a `const` |
16 | --> $DIR/issue-70594.rs:4:9 | |
17 | | | |
18 | LL | [1; ().await]; | |
19 | | ^^^^^^^^ | |
20 | ||
f035d41b | 21 | error[E0277]: `()` is not a future |
ba9703b0 XL |
22 | --> $DIR/issue-70594.rs:4:9 |
23 | | | |
24 | LL | [1; ().await]; | |
f035d41b | 25 | | ^^^^^^^^ `()` is not a future |
ba9703b0 | 26 | | |
1b1a35ee XL |
27 | = help: the trait `Future` is not implemented for `()` |
28 | = note: required by `poll` | |
ba9703b0 | 29 | |
f035d41b | 30 | error: aborting due to 4 previous errors |
ba9703b0 | 31 | |
f035d41b | 32 | Some errors have detailed explanations: E0277, E0728, E0744. |
ba9703b0 | 33 | For more information about an error, try `rustc --explain E0277`. |