Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unnecessary borrow generation
  • Loading branch information
matthewjasper committed Dec 28, 2018
1 parent 60e8253 commit 2149d73
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/librustc_mir/dataflow/impls/borrows.rs
Expand Up @@ -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);
}
}
}
}

Expand Down

0 comments on commit 2149d73

Please sign in to comment.