[−][src]Struct rustc_errors::HandlerInner
This inner struct exists to keep it all behind a single lock; this is done to prevent possible deadlocks in a multi-threaded compiler, as well as inconsistent state observation.
Fields
flags: HandlerFlagserr_count: usizeThe number of errors that have been emitted, including duplicates.
This is not necessarily the count that's reported to the user once compilation ends.
warn_count: usizededuplicated_err_count: usizeemitter: Box<dyn Emitter + Send>delayed_span_bugs: Vec<Diagnostic>delayed_good_path_bugs: Vec<Diagnostic>taught_diagnostics: FxHashSet<DiagnosticId>This set contains the DiagnosticId of all emitted diagnostics to avoid
emitting the same diagnostic with extended help (--teach) twice, which
would be uneccessary repetition.
emitted_diagnostic_codes: FxHashSet<DiagnosticId>Used to suggest rustc --explain
emitted_diagnostics: FxHashSet<u128>This set contains a hash of every diagnostic that has been emitted by this handler. These hashes is used to avoid emitting the same error twice.
stashed_diagnostics: FxIndexMap<(Span, StashKey), Diagnostic>Stashed diagnostics emitted in one stage of the compiler that may be
stolen by other stages (e.g. to improve them and add more information).
The stashed diagnostics count towards the total error count.
When .abort_if_errors() is called, these are also emitted.
deduplicated_warn_count: usizeThe warning count, used for a recap upon finishing
future_breakage_diagnostics: Vec<Diagnostic>Implementations
impl HandlerInner[src]
pub(crate) fn must_teach(&mut self, code: &DiagnosticId) -> bool[src]
pub(crate) fn force_print_diagnostic(&mut self, db: Diagnostic)[src]
pub(crate) fn emit_stashed_diagnostics(&mut self)[src]
Emit all stashed diagnostics.
pub(crate) fn emit_diagnostic(&mut self, diagnostic: &Diagnostic)[src]
pub(crate) fn emit_artifact_notification(
&mut self,
path: &Path,
artifact_type: &str
)[src]
&mut self,
path: &Path,
artifact_type: &str
)
pub(crate) fn treat_err_as_bug(&self) -> bool[src]
pub(crate) fn print_error_count(&mut self, registry: &Registry)[src]
pub(crate) fn err_count(&self) -> usize[src]
pub(crate) fn has_errors(&self) -> bool[src]
pub(crate) fn has_errors_or_delayed_span_bugs(&self) -> bool[src]
pub(crate) fn has_any_message(&self) -> bool[src]
pub(crate) fn abort_if_errors(&mut self)[src]
pub(crate) fn span_bug(&mut self, sp: impl Into<MultiSpan>, msg: &str) -> ![src]
pub(crate) fn emit_diag_at_span(
&mut self,
diag: Diagnostic,
sp: impl Into<MultiSpan>
)[src]
&mut self,
diag: Diagnostic,
sp: impl Into<MultiSpan>
)
pub(crate) fn delay_span_bug(&mut self, sp: impl Into<MultiSpan>, msg: &str)[src]
pub(crate) fn delay_good_path_bug(&mut self, msg: &str)[src]
pub(crate) fn failure(&mut self, msg: &str)[src]
pub(crate) fn fatal(&mut self, msg: &str) -> FatalError[src]
pub(crate) fn err(&mut self, msg: &str)[src]
pub(crate) fn emit_error(&mut self, level: Level, msg: &str)[src]
Emit an error; level should be Error or Fatal.
pub(crate) fn bug(&mut self, msg: &str) -> ![src]
pub(crate) fn delay_as_bug(&mut self, diagnostic: Diagnostic)[src]
pub(crate) fn flush_delayed(&mut self, bugs: Vec<Diagnostic>, explanation: &str)[src]
pub(crate) fn bump_err_count(&mut self)[src]
pub(crate) fn bump_warn_count(&mut self)[src]
pub(crate) fn panic_if_treat_err_as_bug(&self)[src]
Trait Implementations
impl Drop for HandlerInner[src]
Auto Trait Implementations
impl !RefUnwindSafe for HandlerInner
impl !Send for HandlerInner
impl !Sync for HandlerInner
impl Unpin for HandlerInner
impl !UnwindSafe for HandlerInner
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,