From 2149d73358b648ee7c6f9635a123bb8aa6bb2009 Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sat, 1 Dec 2018 15:04:07 +0000 Subject: [PATCH] Remove unnecessary borrow generation --- src/librustc_mir/dataflow/impls/borrows.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/librustc_mir/dataflow/impls/borrows.rs b/src/librustc_mir/dataflow/impls/borrows.rs index 518fbaae6271f..0ceff4aa04898 100644 --- a/src/librustc_mir/dataflow/impls/borrows.rs +++ b/src/librustc_mir/dataflow/impls/borrows.rs @@ -279,20 +279,6 @@ impl<'a, 'gcx, 'tcx> BitDenotation<'tcx> for Borrows<'a, 'gcx, 'tcx> { }); sets.gen(*index); - - // Issue #46746: Two-phase borrows handles - // stmts of form `Tmp = &mut Borrow` ... - match lhs { - Place::Promoted(_) | - Place::Local(..) | Place::Static(..) => {} // okay - Place::Projection(..) => { - // ... can assign into projections, - // e.g., `box (&mut _)`. Current - // conservative solution: force - // immediate activation here. - sets.gen(*index); - } - } } }