File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change 33// edition:2018
44fn main ( ) {
55 await { } ( )
6- //~^ ERROR `await` is only allowed inside `async` functions and blocks
7- //~| ERROR incorrect use of `await`
6+ //~^ ERROR incorrect use of `await`
87}
Original file line number Diff line number Diff line change @@ -4,27 +4,5 @@ error: incorrect use of `await`
44LL | await {}()
55 | ^^^^^^^^ help: `await` is a postfix operation: `{}.await`
66
7- error[E0728]: `await` is only allowed inside `async` functions and blocks
8- --> $DIR/issue-113203.rs:5:5
9- |
10- LL | fn main() {
11- | ---- this is not `async`
12- LL | await {}()
13- | ^^^^^ only allowed inside `async` functions and blocks
14-
15- error[E0277]: `()` is not a future
16- --> $DIR/issue-113203.rs:5:5
17- |
18- LL | await {}()
19- | ^^^^^ - help: remove the `.await`
20- | |
21- | `()` is not a future
22- |
23- = help: the trait `Future` is not implemented for `()`
24- = note: () must be a future or must implement `IntoFuture` to be awaited
25- = note: required for `()` to implement `IntoFuture`
26-
27- error: aborting due to 3 previous errors
7+ error: aborting due to previous error
288
29- Some errors have detailed explanations: E0277, E0728.
30- For more information about an error, try `rustc --explain E0277`.
You can’t perform that action at this time.
0 commit comments