about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEsteban Kuber <esteban@kuber.com.ar>2021-12-10 03:01:37 +0000
committerEsteban Kuber <esteban@kuber.com.ar>2021-12-13 17:09:16 +0000
commit1a7f2d5cd957f56c34d691b67d9b38ce2b063cf3 (patch)
tree4d13b2df9181b3bcab69ad692efd01ba289ab866
parent64dea33a3d843a1d26f32e1cb403634f740436a7 (diff)
downloadrust-1a7f2d5cd957f56c34d691b67d9b38ce2b063cf3.tar.gz
rust-1a7f2d5cd957f56c34d691b67d9b38ce2b063cf3.zip
review comment: change wording of suggestion
-rw-r--r--compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs2
-rw-r--r--src/test/ui/async-await/issue-70594.stderr2
-rw-r--r--src/test/ui/async-await/issues/issue-62009-1.stderr2
-rw-r--r--src/test/ui/async-await/unnecessary-await.stderr2
4 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
index b15e0c327d3..4d17a7140e8 100644
--- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
+++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
@@ -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,
                     );
diff --git a/src/test/ui/async-await/issue-70594.stderr b/src/test/ui/async-await/issue-70594.stderr
index 40570928682..a159edd5118 100644
--- a/src/test/ui/async-await/issue-70594.stderr
+++ b/src/test/ui/async-await/issue-70594.stderr
@@ -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; ()];
diff --git a/src/test/ui/async-await/issues/issue-62009-1.stderr b/src/test/ui/async-await/issues/issue-62009-1.stderr
index 3ea5dac76d4..3d80c34942c 100644
--- a/src/test/ui/async-await/issues/issue-62009-1.stderr
+++ b/src/test/ui/async-await/issues/issue-62009-1.stderr
@@ -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);
diff --git a/src/test/ui/async-await/unnecessary-await.stderr b/src/test/ui/async-await/unnecessary-await.stderr
index 23dea2d3a0c..c3d2a6e7b1e 100644
--- a/src/test/ui/async-await/unnecessary-await.stderr
+++ b/src/test/ui/async-await/unnecessary-await.stderr
@@ -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();