mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
Fix another strange suggestion span
This commit is contained in:
parent
3a3f4a2144
commit
a74db1abb3
@ -1121,7 +1121,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
|
||||
err.eager_subdiagnostic(
|
||||
&self.infcx.tcx.sess.parse_sess.span_diagnostic,
|
||||
CaptureReasonSuggest::FreshReborrow {
|
||||
span: fn_call_span.shrink_to_lo(),
|
||||
span: move_span.shrink_to_hi(),
|
||||
});
|
||||
}
|
||||
if let Some(clone_trait) = tcx.lang_items().clone_trait()
|
||||
|
@ -398,7 +398,7 @@ pub(crate) enum CaptureReasonSuggest<'tcx> {
|
||||
#[suggestion(
|
||||
borrowck_suggest_create_freash_reborrow,
|
||||
applicability = "maybe-incorrect",
|
||||
code = "as_mut().",
|
||||
code = ".as_mut()",
|
||||
style = "verbose"
|
||||
)]
|
||||
FreshReborrow {
|
||||
|
@ -13,7 +13,7 @@ note: `Pin::<&'a mut T>::get_mut` takes ownership of the receiver `self`, which
|
||||
help: consider reborrowing the `Pin` instead of moving it
|
||||
|
|
||||
LL | foo(r.as_mut().get_mut());
|
||||
| +++++++++
|
||||
| +++++++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
@ -16,7 +16,7 @@ LL | fn foo(self: Pin<&mut Self>) {}
|
||||
help: consider reborrowing the `Pin` instead of moving it
|
||||
|
|
||||
LL | foo.as_mut().foo();
|
||||
| +++++++++
|
||||
| +++++++++
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user