Added better error message for shared borrow treated as unique for purposes of lifetimes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user