Skip to content

Commit 542357f

Browse files
committed
Remove two-phase-beyond-autoref
1 parent 4eda151 commit 542357f

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/librustc/session/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,8 +1216,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
12161216
"make unnamed regions display as '# (where # is some non-ident unique id)"),
12171217
borrowck: Option<String> = (None, parse_opt_string, [UNTRACKED],
12181218
"select which borrowck is used (`ast`, `mir`, `migrate`, or `compare`)"),
1219-
two_phase_beyond_autoref: bool = (false, parse_bool, [UNTRACKED],
1220-
"when using two-phase-borrows, allow two phases even for non-autoref `&mut` borrows"),
12211219
time_passes: bool = (false, parse_bool, [UNTRACKED],
12221220
"measure time of each rustc pass"),
12231221
time: bool = (false, parse_bool, [UNTRACKED],

src/librustc_mir/borrow_check/borrow_set.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ impl<'a, 'gcx, 'tcx> GatherBorrows<'a, 'gcx, 'tcx> {
304304
/// Activation phases.
305305
fn allow_two_phase_borrow(&self, kind: mir::BorrowKind) -> bool {
306306
kind.allows_two_phase_borrow()
307-
|| self.tcx.sess.opts.debugging_opts.two_phase_beyond_autoref
308307
}
309308

310309
/// If this is a two-phase borrow, then we will record it

src/librustc_mir/borrow_check/path_utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ use rustc_data_structures::graph::dominators::Dominators;
1212
/// allowed to be split into separate Reservation and
1313
/// Activation phases.
1414
pub(super) fn allow_two_phase_borrow<'a, 'tcx, 'gcx: 'tcx>(
15-
tcx: &TyCtxt<'a, 'gcx, 'tcx>,
15+
_tcx: &TyCtxt<'a, 'gcx, 'tcx>,
1616
kind: BorrowKind
1717
) -> bool {
1818
kind.allows_two_phase_borrow()
19-
|| tcx.sess.opts.debugging_opts.two_phase_beyond_autoref
2019
}
2120

2221
/// Control for the path borrow checking code

0 commit comments

Comments
 (0)