Skip to content

Commit 7da9eee

Browse files
committed
Remove BorrowckMode::Compare
1 parent d15fc17 commit 7da9eee

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/librustc/infer/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,8 @@ impl SuppressRegionErrors {
9797
// If we're on Migrate mode, report AST region errors
9898
BorrowckMode::Migrate => SuppressRegionErrors { suppressed: false },
9999

100-
// If we're on MIR or Compare mode, don't report AST region errors as they should
101-
// be reported by NLL
102-
BorrowckMode::Compare | BorrowckMode::Mir => SuppressRegionErrors { suppressed: true },
100+
// If we're on MIR don't report AST region errors as they should be reported by NLL
101+
BorrowckMode::Mir => SuppressRegionErrors { suppressed: true },
103102
}
104103
}
105104
}

src/librustc/session/config.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ pub enum PrintRequest {
462462
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
463463
pub enum BorrowckMode {
464464
Mir,
465-
Compare,
466465
Migrate,
467466
}
468467

@@ -471,7 +470,6 @@ impl BorrowckMode {
471470
/// on the AST borrow check if the MIR-based one errors.
472471
pub fn migrate(self) -> bool {
473472
match self {
474-
BorrowckMode::Compare => false,
475473
BorrowckMode::Mir => false,
476474
BorrowckMode::Migrate => true,
477475
}
@@ -480,7 +478,6 @@ impl BorrowckMode {
480478
/// Should we emit the AST-based borrow checker errors?
481479
pub fn use_ast(self) -> bool {
482480
match self {
483-
BorrowckMode::Compare => true,
484481
BorrowckMode::Mir => false,
485482
BorrowckMode::Migrate => false,
486483
}
@@ -2315,7 +2312,6 @@ pub fn build_session_options_and_crate_config(
23152312
let borrowck_mode = match debugging_opts.borrowck.as_ref().map(|s| &s[..]) {
23162313
None | Some("migrate") => BorrowckMode::Migrate,
23172314
Some("mir") => BorrowckMode::Mir,
2318-
Some("compare") => BorrowckMode::Compare,
23192315
Some(m) => early_error(error_format, &format!("unknown borrowck mode `{}`", m)),
23202316
};
23212317

0 commit comments

Comments
 (0)