about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristopher Vittal <christopher.vittal@gmail.com>2019-03-25 04:09:52 -0400
committerChristopher Vittal <christopher.vittal@gmail.com>2019-05-02 15:35:49 -0400
commit7da9eeeaa7e3095420c24377d9ad612b8ad321ed (patch)
tree51cf73ab95fed4e32ff3c9ab853cb786a13e27a6
parentd15fc173818ccea6f8d97af13a30d454f9e4b35c (diff)
downloadrust-7da9eeeaa7e3095420c24377d9ad612b8ad321ed.tar.gz
rust-7da9eeeaa7e3095420c24377d9ad612b8ad321ed.zip
Remove BorrowckMode::Compare
-rw-r--r--src/librustc/infer/mod.rs5
-rw-r--r--src/librustc/session/config.rs4
2 files changed, 2 insertions, 7 deletions
diff --git a/src/librustc/infer/mod.rs b/src/librustc/infer/mod.rs
index 65bc2b3e945..fc209df8516 100644
--- a/src/librustc/infer/mod.rs
+++ b/src/librustc/infer/mod.rs
@@ -97,9 +97,8 @@ impl SuppressRegionErrors {
             // If we're on Migrate mode, report AST region errors
             BorrowckMode::Migrate => SuppressRegionErrors { suppressed: false },
 
-            // If we're on MIR or Compare mode, don't report AST region errors as they should
-            // be reported by NLL
-            BorrowckMode::Compare | BorrowckMode::Mir => SuppressRegionErrors { suppressed: true },
+            // If we're on MIR don't report AST region errors as they should be reported by NLL
+            BorrowckMode::Mir => SuppressRegionErrors { suppressed: true },
         }
     }
 }
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 4682eb54783..4577c06fc68 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -462,7 +462,6 @@ pub enum PrintRequest {
 #[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
 pub enum BorrowckMode {
     Mir,
-    Compare,
     Migrate,
 }
 
@@ -471,7 +470,6 @@ impl BorrowckMode {
     /// on the AST borrow check if the MIR-based one errors.
     pub fn migrate(self) -> bool {
         match self {
-            BorrowckMode::Compare => false,
             BorrowckMode::Mir => false,
             BorrowckMode::Migrate => true,
         }
@@ -480,7 +478,6 @@ impl BorrowckMode {
     /// Should we emit the AST-based borrow checker errors?
     pub fn use_ast(self) -> bool {
         match self {
-            BorrowckMode::Compare => true,
             BorrowckMode::Mir => 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[..]) {
         None | Some("migrate") => BorrowckMode::Migrate,
         Some("mir") => BorrowckMode::Mir,
-        Some("compare") => BorrowckMode::Compare,
         Some(m) => early_error(error_format, &format!("unknown borrowck mode `{}`", m)),
     };