diff options
| author | Lukas Markeffsky <@> | 2022-09-12 16:54:25 +0200 |
|---|---|---|
| committer | Lukas Markeffsky <@> | 2022-09-12 16:54:25 +0200 |
| commit | 2b7fb8d9418dbf98e6ee8ed406f830b4fcbea55f (patch) | |
| tree | 35f3e3a31dca920ce3ee87779a1ddac72fa72268 /compiler/rustc_trait_selection/src/traits | |
| parent | 56e7678ca97e9740f7d09206f767d5bb676917f7 (diff) | |
| download | rust-2b7fb8d9418dbf98e6ee8ed406f830b4fcbea55f.tar.gz rust-2b7fb8d9418dbf98e6ee8ed406f830b4fcbea55f.zip | |
Impove diagnostic for .await-ing non-futures
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs | 4 |
1 files changed, 2 insertions, 2 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 ecbeb9d79b1..cb605cacc9c 100644 --- a/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs +++ b/compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs @@ -1160,8 +1160,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> { // and if not maybe suggest doing something else? If we kept the expression around we // could also check if it is an fn call (very likely) and suggest changing *that*, if // it is from the local crate. - err.span_suggestion_verbose( - expr.span.shrink_to_hi().with_hi(span.hi()), + err.span_suggestion( + span, "remove the `.await`", "", Applicability::MachineApplicable, |
