about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-11-26 17:56:16 -0600
committerGitHub <noreply@github.com>2019-11-26 17:56:16 -0600
commitbf25f8ee19fed5584c091c9e7937e122cd8abb8e (patch)
treeb0b245b86a27efe28e2527bb3e1929153c9f960b
parentf178d35ae75ac4155b005934b6a5ed9b589744cb (diff)
parent2299586ffc3b635c4bb90c15cd0ad92e1ea3128d (diff)
downloadrust-bf25f8ee19fed5584c091c9e7937e122cd8abb8e.tar.gz
rust-bf25f8ee19fed5584c091c9e7937e122cd8abb8e.zip
Rollup merge of #66720 - Mark-Simulacrum:error-reported, r=Centril
Move ErrorReported to rustc_errors

The new location is more consistent with what this type is for, though we don't remove it from the old location (via a re-export) to avoid changing the dozens of use sites (~139 at this time).
-rw-r--r--src/librustc/util/common.rs6
-rw-r--r--src/librustc_errors/lib.rs7
2 files changed, 8 insertions, 5 deletions
diff --git a/src/librustc/util/common.rs b/src/librustc/util/common.rs
index 3e52a6aa508..8581a5b220a 100644
--- a/src/librustc/util/common.rs
+++ b/src/librustc/util/common.rs
@@ -7,7 +7,6 @@ use std::fmt::Debug;
 use std::time::{Duration, Instant};
 
 use syntax::symbol::{Symbol, sym};
-use rustc_macros::HashStable;
 use crate::session::Session;
 
 #[cfg(test)]
@@ -16,10 +15,7 @@ mod tests;
 // The name of the associated type for `Fn` return types.
 pub const FN_OUTPUT_NAME: Symbol = sym::Output;
 
-// Useful type to use with `Result<>` indicate that an error has already
-// been reported to the user, so no need to continue checking.
-#[derive(Clone, Copy, Debug, RustcEncodable, RustcDecodable, HashStable)]
-pub struct ErrorReported;
+pub use errors::ErrorReported;
 
 thread_local!(static TIME_DEPTH: Cell<usize> = Cell::new(0));
 
diff --git a/src/librustc_errors/lib.rs b/src/librustc_errors/lib.rs
index 8a1799faaf8..ae587684818 100644
--- a/src/librustc_errors/lib.rs
+++ b/src/librustc_errors/lib.rs
@@ -993,3 +993,10 @@ macro_rules! pluralize {
         if $x != 1 { "s" } else { "" }
     };
 }
+
+// Useful type to use with `Result<>` indicate that an error has already
+// been reported to the user, so no need to continue checking.
+#[derive(Clone, Copy, Debug, RustcEncodable, RustcDecodable, Hash, PartialEq, Eq)]
+pub struct ErrorReported;
+
+rustc_data_structures::impl_stable_hash_via_hash!(ErrorReported);