]> git.proxmox.com Git - rustc.git/blob - src/test/ui/async-await/issue-70594.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / 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 | ^^^^^^ `()` is not a future
26 |
27 = help: the trait `Future` is not implemented for `()`
28 = note: () must be a future or must implement `IntoFuture` to be awaited
29 = note: required because of the requirements on the impl of `IntoFuture` for `()`
30 help: remove the `.await`
31 |
32 LL - [1; ().await];
33 LL + [1; ()];
34 |
35
36 error: aborting due to 4 previous errors
37
38 Some errors have detailed explanations: E0277, E0728, E0744.
39 For more information about an error, try `rustc --explain E0277`.