Auto merge of #77692 - PankajChaudhary5:issue-76630, r=davidtwco
Added better error message for shared borrow treated as unique for purposes of lifetimes Part of Issue #76630 r? `@jyn514`
This commit is contained in:
commit
c34c015fe2
8 changed files with 18 additions and 17 deletions
|
@ -68,9 +68,10 @@ impl<'cx, 'tcx> crate::borrow_check::MirBorrowckCtxt<'cx, 'tcx> {
|
|||
err.span_label(
|
||||
new_loan_span,
|
||||
format!(
|
||||
"mutable borrow starts here in previous \
|
||||
iteration of loop{}",
|
||||
opt_via
|
||||
"{}{} was mutably borrowed here in the previous iteration of the loop{}",
|
||||
desc,
|
||||
via(opt_via),
|
||||
opt_via,
|
||||
),
|
||||
);
|
||||
if let Some(old_load_end_span) = old_load_end_span {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue