Skip to content

Commit 2299586

Browse files
Move ErrorReported to rustc_errors
1 parent 797fd92 commit 2299586

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/librustc/util/common.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ use std::fmt::Debug;
77
use std::time::{Duration, Instant};
88

99
use syntax::symbol::{Symbol, sym};
10-
use rustc_macros::HashStable;
1110
use crate::session::Session;
1211

1312
#[cfg(test)]
@@ -16,10 +15,7 @@ mod tests;
1615
// The name of the associated type for `Fn` return types.
1716
pub const FN_OUTPUT_NAME: Symbol = sym::Output;
1817

19-
// Useful type to use with `Result<>` indicate that an error has already
20-
// been reported to the user, so no need to continue checking.
21-
#[derive(Clone, Copy, Debug, RustcEncodable, RustcDecodable, HashStable)]
22-
pub struct ErrorReported;
18+
pub use errors::ErrorReported;
2319

2420
thread_local!(static TIME_DEPTH: Cell<usize> = Cell::new(0));
2521

src/librustc_errors/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -993,3 +993,10 @@ macro_rules! pluralize {
993993
if $x != 1 { "s" } else { "" }
994994
};
995995
}
996+
997+
// Useful type to use with `Result<>` indicate that an error has already
998+
// been reported to the user, so no need to continue checking.
999+
#[derive(Clone, Copy, Debug, RustcEncodable, RustcDecodable, Hash, PartialEq, Eq)]
1000+
pub struct ErrorReported;
1001+
1002+
rustc_data_structures::impl_stable_hash_via_hash!(ErrorReported);

0 commit comments

Comments
 (0)