From: Yuki OKUSHI Date: Sun, 28 Apr 2019 03:51:04 +0000 (+0900) Subject: Remove two-phase-beyond-autoref X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=542357f52a38efc79630854c4df2e6bbbc3437e4;p=rust.git Remove two-phase-beyond-autoref --- 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 @@ fn parse_merge_functions(slot: &mut Option, v: Option<&str>) -> "make unnamed regions display as '# (where # is some non-ident unique id)"), borrowck: Option = (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 @@ /// 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