review comment: change wording of suggestion

This commit is contained in:
Esteban Kuber 2021-12-10 03:01:37 +00:00
parent 64dea33a3d
commit 1a7f2d5cd9
4 changed files with 4 additions and 4 deletions

View file

@ -896,7 +896,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
// it is from the local crate.
err.span_suggestion_verbose(
expr.span.shrink_to_hi().with_hi(span.hi()),
"do not `.await` the expression",
"remove the `.await`",
String::new(),
Applicability::MachineApplicable,
);

View file

@ -27,7 +27,7 @@ LL | [1; ().await];
= help: the trait `Future` is not implemented for `()`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required because of the requirements on the impl of `IntoFuture` for `()`
help: do not `.await` the expression
help: remove the `.await`
|
LL - [1; ().await];
LL + [1; ()];

View file

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

View file

@ -9,7 +9,7 @@ LL | boo().await;
= help: the trait `Future` is not implemented for `()`
= note: () must be a future or must implement `IntoFuture` to be awaited
= note: required because of the requirements on the impl of `IntoFuture` for `()`
help: do not `.await` the expression
help: remove the `.await`
|
LL - boo().await;
LL + boo();