Check for two_phase_borrows in the right place

Fix a small compilation issue after I missed a critical change after rebasing
yesterday (ref c933440)
This commit is contained in:
bobtwinkles 2018-03-06 04:19:41 -05:00
parent 03f198fcee
commit 2ed0f516dd

View file

@ -351,7 +351,7 @@ impl<'a, 'gcx, 'tcx> Borrows<'a, 'gcx, 'tcx> {
/// allowed to be split into separate Reservation and
/// Activation phases.
fn allow_two_phase_borrow(&self, kind: mir::BorrowKind) -> bool {
self.tcx.sess.two_phase_borrows() &&
self.tcx.two_phase_borrows() &&
(kind.allows_two_phase_borrow() ||
self.tcx.sess.opts.debugging_opts.two_phase_beyond_autoref)
}