Skip to content

Commit 9ed5267

Browse files
committed
fix tests
1 parent 6d256d9 commit 9ed5267

File tree

2 files changed

+2
-25
lines changed

2 files changed

+2
-25
lines changed

tests/ui/parser/issue-113203.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
// edition:2018
44
fn 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
}

tests/ui/parser/issue-113203.stderr

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,5 @@ error: incorrect use of `await`
44
LL | 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`.

0 commit comments

Comments
 (0)