1
Fork 0

Remove BorrowckMode::Compare

This commit is contained in:
Christopher Vittal 2019-03-25 04:09:52 -04:00
parent d15fc17381
commit 7da9eeeaa7
2 changed files with 2 additions and 7 deletions

View file

@ -97,9 +97,8 @@ impl SuppressRegionErrors {
// If we're on Migrate mode, report AST region errors // If we're on Migrate mode, report AST region errors
BorrowckMode::Migrate => SuppressRegionErrors { suppressed: false }, BorrowckMode::Migrate => SuppressRegionErrors { suppressed: false },
// If we're on MIR or Compare mode, don't report AST region errors as they should // If we're on MIR don't report AST region errors as they should be reported by NLL
// be reported by NLL BorrowckMode::Mir => SuppressRegionErrors { suppressed: true },
BorrowckMode::Compare | BorrowckMode::Mir => SuppressRegionErrors { suppressed: true },
} }
} }
} }

View file

@ -462,7 +462,6 @@ pub enum PrintRequest {
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum BorrowckMode { pub enum BorrowckMode {
Mir, Mir,
Compare,
Migrate, Migrate,
} }
@ -471,7 +470,6 @@ impl BorrowckMode {
/// on the AST borrow check if the MIR-based one errors. /// on the AST borrow check if the MIR-based one errors.
pub fn migrate(self) -> bool { pub fn migrate(self) -> bool {
match self { match self {
BorrowckMode::Compare => false,
BorrowckMode::Mir => false, BorrowckMode::Mir => false,
BorrowckMode::Migrate => true, BorrowckMode::Migrate => true,
} }
@ -480,7 +478,6 @@ impl BorrowckMode {
/// Should we emit the AST-based borrow checker errors? /// Should we emit the AST-based borrow checker errors?
pub fn use_ast(self) -> bool { pub fn use_ast(self) -> bool {
match self { match self {
BorrowckMode::Compare => true,
BorrowckMode::Mir => false, BorrowckMode::Mir => false,
BorrowckMode::Migrate => false, BorrowckMode::Migrate => false,
} }
@ -2315,7 +2312,6 @@ pub fn build_session_options_and_crate_config(
let borrowck_mode = match debugging_opts.borrowck.as_ref().map(|s| &s[..]) { let borrowck_mode = match debugging_opts.borrowck.as_ref().map(|s| &s[..]) {
None | Some("migrate") => BorrowckMode::Migrate, None | Some("migrate") => BorrowckMode::Migrate,
Some("mir") => BorrowckMode::Mir, Some("mir") => BorrowckMode::Mir,
Some("compare") => BorrowckMode::Compare,
Some(m) => early_error(error_format, &format!("unknown borrowck mode `{}`", m)), Some(m) => early_error(error_format, &format!("unknown borrowck mode `{}`", m)),
}; };