diff options
| author | Michael Goulet <michael@errs.io> | 2023-06-22 20:40:49 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-07-10 20:09:28 +0000 |
| commit | 3a3f4a21445d1175294552fa40446a3116103cef (patch) | |
| tree | 54373cafd3efe27f636da943111eed5e59c3074b /compiler | |
| parent | fe870424a75aeb4727f9516808b2f5735d014ab6 (diff) | |
| download | rust-3a3f4a21445d1175294552fa40446a3116103cef.tar.gz rust-3a3f4a21445d1175294552fa40446a3116103cef.zip | |
Don't use method span on clone suggestion
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_borrowck/src/diagnostics/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_borrowck/src/diagnostics/mod.rs b/compiler/rustc_borrowck/src/diagnostics/mod.rs index d292611e6a2..f81c71b7394 100644 --- a/compiler/rustc_borrowck/src/diagnostics/mod.rs +++ b/compiler/rustc_borrowck/src/diagnostics/mod.rs @@ -1135,10 +1135,10 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> { && self.infcx.predicate_must_hold_modulo_regions(&o) { err.span_suggestion_verbose( - fn_call_span.shrink_to_lo(), + move_span.shrink_to_hi(), "you can `clone` the value and consume it, but this might not be \ your desired behavior", - "clone().".to_string(), + ".clone()".to_string(), Applicability::MaybeIncorrect, ); } |
