]> git.lizzy.rs Git - rust.git/commitdiff
Remove two-phase-beyond-autoref
authorYuki OKUSHI <huyuumi.dev@gmail.com>
Sun, 28 Apr 2019 03:51:04 +0000 (12:51 +0900)
committerYuki OKUSHI <huyuumi.dev@gmail.com>
Sun, 28 Apr 2019 03:51:04 +0000 (12:51 +0900)
src/librustc/session/config.rs
src/librustc_mir/borrow_check/borrow_set.rs
src/librustc_mir/borrow_check/path_utils.rs

index 836f42ff4ba7911f5d3813333129cc87904da3e5..75814ba6aab3d4cf91a1af3c84902cf842c27891 100644 (file)
@@ -1216,8 +1216,6 @@ fn parse_merge_functions(slot: &mut Option<MergeFunctions>, v: Option<&str>) ->
         "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],
index 918192395c3f4eaa42f36c11af31c0638fb0de61..c67e2b529c9d476355420349ceb219f1b253e29c 100644 (file)
@@ -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
index c68dee29c5b1be14e6559e9f63470e40aace952e..f6a22cf040797b19d3b61f55d4b2a484ef2f488d 100644 (file)
 /// 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