fork/rust

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

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
1.3 KiB41 linesraw
1error[E0728]: `await` is only allowed inside `async` functions and blocks
2  --> $DIR/issue-70594.rs:4:9
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[E0658]: `loop` is not allowed in a `const`
16  --> $DIR/issue-70594.rs:4:9
17   |
18LL |     [1; ().await];
19   |         ^^^^^^^^
20   |
21   = note: see issue #52000 <https://github.com/rust-lang/rust/issues/52000> for more information
22   = help: add `#![feature(const_loop)]` to the crate attributes to enable
23
24error[E0744]: `.await` is not allowed in a `const`
25  --> $DIR/issue-70594.rs:4:9
26   |
27LL |     [1; ().await];
28   |         ^^^^^^^^
29
30error[E0277]: the trait bound `(): std::future::Future` is not satisfied
31  --> $DIR/issue-70594.rs:4:9
32   |
33LL |     [1; ().await];
34   |         ^^^^^^^^ the trait `std::future::Future` is not implemented for `()`
35   |
36   = note: required by `std::future::Future::poll`
37
38error: aborting due to 5 previous errors
39
40Some errors have detailed explanations: E0277, E0658, E0728, E0744.
41For more information about an error, try `rustc --explain E0277`.