about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki OKUSHI <huyuumi.dev@gmail.com>2019-04-28 12:51:04 +0900
committerYuki OKUSHI <huyuumi.dev@gmail.com>2019-04-28 12:51:04 +0900
commit542357f52a38efc79630854c4df2e6bbbc3437e4 (patch)
tree64d38da6678bb49195b92ab7cf3dadb346b1418b
parent4eda15174e287daf6d3fa223eed1b1227a02b671 (diff)
downloadrust-542357f52a38efc79630854c4df2e6bbbc3437e4.tar.gz
rust-542357f52a38efc79630854c4df2e6bbbc3437e4.zip
Remove two-phase-beyond-autoref
-rw-r--r--src/librustc/session/config.rs2
-rw-r--r--src/librustc_mir/borrow_check/borrow_set.rs1
-rw-r--r--src/librustc_mir/borrow_check/path_utils.rs3
3 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 836f42ff4ba..75814ba6aab 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -1216,8 +1216,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
         "make unnamed regions display as '# (where # is some non-ident unique id)"),
     borrowck: Option<String> = (None, parse_opt_string, [UNTRACKED],
         "select which borrowck is used (`ast`, `mir`, `migrate`, or `compare`)"),
-    two_phase_beyond_autoref: bool = (false, parse_bool, [UNTRACKED],
-        "when using two-phase-borrows, allow two phases even for non-autoref `&mut` borrows"),
     time_passes: bool = (false, parse_bool, [UNTRACKED],
         "measure time of each rustc pass"),
     time: bool = (false, parse_bool, [UNTRACKED],
diff --git a/src/librustc_mir/borrow_check/borrow_set.rs b/src/librustc_mir/borrow_check/borrow_set.rs
index 918192395c3..c67e2b529c9 100644
--- a/src/librustc_mir/borrow_check/borrow_set.rs
+++ b/src/librustc_mir/borrow_check/borrow_set.rs
@@ -304,7 +304,6 @@ impl<'a, 'gcx, 'tcx> GatherBorrows<'a, 'gcx, 'tcx> {
     /// Activation phases.
     fn allow_two_phase_borrow(&self, kind: mir::BorrowKind) -> bool {
         kind.allows_two_phase_borrow()
-            || self.tcx.sess.opts.debugging_opts.two_phase_beyond_autoref
     }
 
     /// If this is a two-phase borrow, then we will record it
diff --git a/src/librustc_mir/borrow_check/path_utils.rs b/src/librustc_mir/borrow_check/path_utils.rs
index c68dee29c5b..f6a22cf0407 100644
--- a/src/librustc_mir/borrow_check/path_utils.rs
+++ b/src/librustc_mir/borrow_check/path_utils.rs
@@ -12,11 +12,10 @@ use rustc_data_structures::graph::dominators::Dominators;
 /// allowed to be split into separate Reservation and
 /// Activation phases.
 pub(super) fn allow_two_phase_borrow<'a, 'tcx, 'gcx: 'tcx>(
-    tcx: &TyCtxt<'a, 'gcx, 'tcx>,
+    _tcx: &TyCtxt<'a, 'gcx, 'tcx>,
     kind: BorrowKind
 ) -> bool {
     kind.allows_two_phase_borrow()
-        || tcx.sess.opts.debugging_opts.two_phase_beyond_autoref
 }
 
 /// Control for the path borrow checking code