Skip to content
Permalink
Browse files

Move ErrorReported to rustc_errors

  • Loading branch information
Mark-Simulacrum committed Nov 24, 2019
1 parent 797fd92 commit 2299586ffc3b635c4bb90c15cd0ad92e1ea3128d
Showing with 8 additions and 5 deletions.
  1. +1 −5 src/librustc/util/common.rs
  2. +7 −0 src/librustc_errors/lib.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));

@@ -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);

0 comments on commit 2299586

Please sign in to comment.
You can’t perform that action at this time.