Skip to content

Commit a310dfb

Browse files
committed
review comment: change wording of suggestion
1 parent df5439c commit a310dfb

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
896896
// it is from the local crate.
897897
err.span_suggestion_verbose(
898898
expr.span.shrink_to_hi().with_hi(span.hi()),
899-
"do not `.await` the expression",
899+
"remove the `.await`",
900900
String::new(),
901901
Applicability::MachineApplicable,
902902
);

src/test/ui/async-await/issue-70594.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ LL | [1; ().await];
2727
= help: the trait `Future` is not implemented for `()`
2828
= note: () must be a future or must implement `IntoFuture` to be awaited
2929
= note: required because of the requirements on the impl of `IntoFuture` for `()`
30-
help: do not `.await` the expression
30+
help: remove the `.await`
3131
|
3232
LL - [1; ().await];
3333
LL + [1; ()];

src/test/ui/async-await/issues/issue-62009-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LL | (|_| 2333).await;
3333
= help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
3434
= note: [closure@$DIR/issue-62009-1.rs:12:5: 12:15] must be a future or must implement `IntoFuture` to be awaited
3535
= note: required because of the requirements on the impl of `IntoFuture` for `[closure@$DIR/issue-62009-1.rs:12:5: 12:15]`
36-
help: do not `.await` the expression
36+
help: remove the `.await`
3737
|
3838
LL - (|_| 2333).await;
3939
LL + (|_| 2333);

src/test/ui/async-await/unnecessary-await.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LL | boo().await;
99
= help: the trait `Future` is not implemented for `()`
1010
= note: () must be a future or must implement `IntoFuture` to be awaited
1111
= note: required because of the requirements on the impl of `IntoFuture` for `()`
12-
help: do not `.await` the expression
12+
help: remove the `.await`
1313
|
1414
LL - boo().await;
1515
LL + boo();

0 commit comments

Comments
 (0)