From 2299586ffc3b635c4bb90c15cd0ad92e1ea3128d Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Sun, 24 Nov 2019 16:59:56 -0500 Subject: Move ErrorReported to rustc_errors --- src/librustc_errors/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/librustc_errors') 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); -- cgit 1.4.1-3-g733a5