Skip to content

Commit bf25f8e

Browse files
authored
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).
2 parents f178d35 + 2299586 commit bf25f8e

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/librustc/util/common.rs

Lines changed: 1 addition & 5 deletions
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

Lines changed: 7 additions & 0 deletions
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)