[][src]Crate rustc_errors

Diagnostics creation and emission for rustc.

This module contains the code for creating and emitting diagnostics.

Re-exports

pub use emitter::ColorConfig;

Modules

annotate_snippet_emitter_writer

Emit diagnostics using the annotate-snippets library

diagnostic
diagnostic_builder
emitter

The current rustc diagnostics emitter.

json

A JSON emitter for errors.

lock

Bindings to acquire a global named lock.

registry
snippet
styled_buffer

Macros

error_code
pluralize
struct_span_err

Structs

CodeSuggestion
Diagnostic
DiagnosticBuilder

Used for emitting structured error messages and other diagnostic information.

DiagnosticStyledString
ErrorReported
ExplicitBug

Signifies that the compiler died with an explicit call to .bug or .span_bug rather than a failed assertion, etc.

FatalError

Used as a return value to signify a fatal error occurred. (It is also used as the argument to panic at the moment, but that will eventually not be true.)

FatalErrorMarker
Handler

A handler deals with errors and other compiler output. Certain errors (fatal, bug, unimpl) may cause immediate exit, others log errors for later reporting.

HandlerFlags
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.

SubDiagnostic

For example a note attached to an error.

Substitution

See the docs on CodeSuggestion::substitutions

SubstitutionPart

Enums

Applicability

Indicates the confidence in the correctness of a suggestion.

DiagnosticId
Level
StashKey

A key denoting where from a diagnostic was stashed.

Style
SuggestionStyle

Statics

TRACK_DIAGNOSTICS

Functions

add_elided_lifetime_in_path_suggestion
default_track_diagnostic

Type Definitions

PResult