Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9e3f330

Browse files
authoredJan 25, 2023
Rollup merge of #106897 - estebank:issue-99430, r=davidtwco
Tweak E0597 CC #99430
2 parents f21728f + 7b8251e commit 9e3f330

File tree

230 files changed

+853
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+853
-354
lines changed
 

‎compiler/rustc_borrowck/src/borrowck_errors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
3737
desc,
3838
);
3939

40-
err.span_label(borrow_span, format!("borrow of {} occurs here", borrow_desc));
40+
err.span_label(borrow_span, format!("{} is borrowed here", borrow_desc));
4141
err.span_label(span, format!("use of borrowed {}", borrow_desc));
4242
err
4343
}
@@ -250,8 +250,8 @@ impl<'cx, 'tcx> crate::MirBorrowckCtxt<'cx, 'tcx> {
250250
desc,
251251
);
252252

253-
err.span_label(borrow_span, format!("borrow of {} occurs here", desc));
254-
err.span_label(span, format!("assignment to borrowed {} occurs here", desc));
253+
err.span_label(borrow_span, format!("{} is borrowed here", desc));
254+
err.span_label(span, format!("{} is assigned to here but it was already borrowed", desc));
255255
err
256256
}
257257

‎compiler/rustc_borrowck/src/diagnostics/conflict_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1736,7 +1736,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
17361736
&self.local_names,
17371737
&mut err,
17381738
"",
1739-
None,
1739+
Some(borrow_span),
17401740
None,
17411741
);
17421742
}

0 commit comments

Comments
 (0)
Please sign in to comment.