Skip to content

Commit 2149d73

Browse files
committed
Remove unnecessary borrow generation
1 parent 60e8253 commit 2149d73

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/librustc_mir/dataflow/impls/borrows.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -279,20 +279,6 @@ impl<'a, 'gcx, 'tcx> BitDenotation<'tcx> for Borrows<'a, 'gcx, 'tcx> {
279279
});
280280

281281
sets.gen(*index);
282-
283-
// Issue #46746: Two-phase borrows handles
284-
// stmts of form `Tmp = &mut Borrow` ...
285-
match lhs {
286-
Place::Promoted(_) |
287-
Place::Local(..) | Place::Static(..) => {} // okay
288-
Place::Projection(..) => {
289-
// ... can assign into projections,
290-
// e.g., `box (&mut _)`. Current
291-
// conservative solution: force
292-
// immediate activation here.
293-
sets.gen(*index);
294-
}
295-
}
296282
}
297283
}
298284

0 commit comments

Comments
 (0)