]> git.proxmox.com Git - rustc.git/blame - src/test/ui/async-await/issues/issue-62009-1.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / async-await / issues / issue-62009-1.stderr
CommitLineData
dc9dc135 1error[E0728]: `await` is only allowed inside `async` functions and blocks
a2a8927a 2 --> $DIR/issue-62009-1.rs:6:22
dc9dc135
XL
3 |
4LL | fn main() {
5 | ---- this is not `async`
6LL | async { let (); }.await;
a2a8927a 7 | ^^^^^^ only allowed inside `async` functions and blocks
dc9dc135
XL
8
9error[E0728]: `await` is only allowed inside `async` functions and blocks
a2a8927a 10 --> $DIR/issue-62009-1.rs:10:6
dc9dc135 11 |
a2a8927a
XL
12LL | fn main() {
13 | ---- this is not `async`
dc9dc135 14...
a2a8927a
XL
15LL | }.await;
16 | ^^^^^^ only allowed inside `async` functions and blocks
dc9dc135
XL
17
18error[E0728]: `await` is only allowed inside `async` functions and blocks
a2a8927a 19 --> $DIR/issue-62009-1.rs:12:15
dc9dc135
XL
20 |
21LL | fn main() {
22 | ---- this is not `async`
23...
24LL | (|_| 2333).await;
a2a8927a 25 | ^^^^^^ only allowed inside `async` functions and blocks
dc9dc135 26
f035d41b 27error[E0277]: `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
a2a8927a 28 --> $DIR/issue-62009-1.rs:12:15
dc9dc135
XL
29 |
30LL | (|_| 2333).await;
a2a8927a 31 | ^^^^^^ `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]` is not a future
dc9dc135 32 |
1b1a35ee 33 = help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
a2a8927a
XL
34 = note: [closure@$DIR/issue-62009-1.rs:12:5: 12:15] must be a future or must implement `IntoFuture` to be awaited
35 = note: required because of the requirements on the impl of `IntoFuture` for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
36help: remove the `.await`
37 |
38LL - (|_| 2333).await;
39LL + (|_| 2333);
923072b8 40 |
dc9dc135 41
416331ca 42error: aborting due to 4 previous errors
dc9dc135 43
e74abb32
XL
44Some errors have detailed explanations: E0277, E0728.
45For more information about an error, try `rustc --explain E0277`.