1
Fork 0

Don't use method span on clone suggestion

This commit is contained in:
Michael Goulet 2023-06-22 20:40:49 +00:00
parent fe870424a7
commit 3a3f4a2144
13 changed files with 58 additions and 15 deletions

View file

@ -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,
);
}