]> git.lizzy.rs Git - rust.git/commitdiff
Move ErrorReported to rustc_errors
authorMark Rousskov <mark.simulacrum@gmail.com>
Sun, 24 Nov 2019 21:59:56 +0000 (16:59 -0500)
committerMark Rousskov <mark.simulacrum@gmail.com>
Tue, 26 Nov 2019 19:57:07 +0000 (14:57 -0500)
src/librustc/util/common.rs
src/librustc_errors/lib.rs

index 3e52a6aa50850c12901e0f9b8c5cac6e418a5374..8581a5b220ac6ac6e7c82e31e8023696f0de7604 100644 (file)
@@ -7,7 +7,6 @@
 use std::time::{Duration, Instant};
 
 use syntax::symbol::{Symbol, sym};
-use rustc_macros::HashStable;
 use crate::session::Session;
 
 #[cfg(test)]
 // 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));
 
index 8a1799faaf8eea42c15696c1402e078003de3b74..ae5876848185bc89c8588563813450c3644724ac 100644 (file)
@@ -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);