Skip to content

Commit 2b97a44

Browse files
committed
mir is already a reference
1 parent 938c3d7 commit 2b97a44

File tree

1 file changed

+3
-3
lines changed
  • src/librustc_mir/borrow_check/nll/explain_borrow

1 file changed

+3
-3
lines changed

src/librustc_mir/borrow_check/nll/explain_borrow/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
4040
if let Some(cause) = cause_info.why_region_contains_point(borrow.region, context.loc) {
4141
match *cause.root_cause() {
4242
Cause::LiveVar(local, location) => {
43-
match find_regular_use(&mir, regioncx, borrow, location, local) {
43+
match find_regular_use(mir, regioncx, borrow, location, local) {
4444
Some(p) => {
4545
err.span_label(
4646
mir.source_info(p).span,
@@ -58,9 +58,9 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
5858
}
5959

6060
Cause::DropVar(local, location) => {
61-
match find_drop_use(&mir, regioncx, borrow, location, local) {
61+
match find_drop_use(mir, regioncx, borrow, location, local) {
6262
Some(p) => {
63-
let local_name = &mir.local_decls[local].name.unwrap();
63+
let local_name = mir.local_decls[local].name.unwrap();
6464

6565
err.span_label(
6666
mir.source_info(p).span,

0 commit comments

Comments
 (0)