From 9ed5267e61b9f39e729807bd7d37858243257e24 Mon Sep 17 00:00:00 2001 From: darklyspaced Date: Mon, 7 Aug 2023 22:31:32 +0800 Subject: [PATCH] fix tests --- tests/ui/parser/issue-113203.rs | 3 +-- tests/ui/parser/issue-113203.stderr | 24 +----------------------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/tests/ui/parser/issue-113203.rs b/tests/ui/parser/issue-113203.rs index eeefd941da4..1103251c140 100644 --- a/tests/ui/parser/issue-113203.rs +++ b/tests/ui/parser/issue-113203.rs @@ -3,6 +3,5 @@ // edition:2018 fn main() { await {}() - //~^ ERROR `await` is only allowed inside `async` functions and blocks - //~| ERROR incorrect use of `await` + //~^ ERROR incorrect use of `await` } diff --git a/tests/ui/parser/issue-113203.stderr b/tests/ui/parser/issue-113203.stderr index f205f4addcd..97304a89c9e 100644 --- a/tests/ui/parser/issue-113203.stderr +++ b/tests/ui/parser/issue-113203.stderr @@ -4,27 +4,5 @@ error: incorrect use of `await` LL | await {}() | ^^^^^^^^ help: `await` is a postfix operation: `{}.await` -error[E0728]: `await` is only allowed inside `async` functions and blocks - --> $DIR/issue-113203.rs:5:5 - | -LL | fn main() { - | ---- this is not `async` -LL | await {}() - | ^^^^^ only allowed inside `async` functions and blocks +error: aborting due to previous error -error[E0277]: `()` is not a future - --> $DIR/issue-113203.rs:5:5 - | -LL | await {}() - | ^^^^^ - help: remove the `.await` - | | - | `()` is not a future - | - = help: the trait `Future` is not implemented for `()` - = note: () must be a future or must implement `IntoFuture` to be awaited - = note: required for `()` to implement `IntoFuture` - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0277, E0728. -For more information about an error, try `rustc --explain E0277`.