fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.1 KiB37 linesraw
1error[E0728]: `await` is only allowed inside `async` functions and blocks
2  --> $DIR/issue-70594.rs:4:12
3   |
4LL | async fn fun() {
5   |          --- this is not `async`
6LL |     [1; ().await];
7   |            ^^^^^ only allowed inside `async` functions and blocks
8
9error[E0744]: `.await` is not allowed in a `const`
10  --> $DIR/issue-70594.rs:4:9
11   |
12LL |     [1; ().await];
13   |         ^^^^^^^^
14
15error[E0744]: `.await` is not allowed in a `const`
16  --> $DIR/issue-70594.rs:4:12
17   |
18LL |     [1; ().await];
19   |            ^^^^^
20
21error[E0277]: `()` is not a future
22  --> $DIR/issue-70594.rs:4:12
23   |
24LL |     [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
34error: aborting due to 4 previous errors
35
36Some errors have detailed explanations: E0277, E0728, E0744.
37For more information about an error, try `rustc --explain E0277`.