Crate rustc_errors[−][src]
Expand description
Diagnostics creation and emission for rustc.
This module contains the code for creating and emitting diagnostics.
Re-exports
pub use emitter::ColorConfig;Modules
Emit diagnostics using the annotate-snippets library
The current rustc diagnostics emitter.
A JSON emitter for errors.
Bindings to acquire a global named lock.
This module defines types which are thread safe if cfg!(parallel_compiler) is true.
Traits for working with Errors.
Utilities for formatting and printing Strings.
Panic support in the standard library.
Macros
Derive macro generating an impl of the trait Hash.
Panics the current thread.
Structs
This is essentially an AtomicPtr but is guaranteed to always be valid
A captured OS thread stack backtrace.
A color specification.
Used for emitting structured error messages and other diagnostic information.
Signifies that the compiler died with an explicit call to .bug
or .span_bug rather than a failed assertion, etc.
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.)
A handler deals with errors and other compiler output. Certain errors (fatal, bug, unimpl) may cause immediate exit, others log errors for later reporting.
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.
A source code location used for error reporting.
A collection of Spans.
A compressed span.
When hashing something that ends up affecting properties like symbol names, we want these symbol names to be calculated independently of other factors like what architecture you’re compiling from.
A “sub”-diagnostic attached to a parent diagnostic. For example, a note attached to an error.
See the docs on CodeSuggestion::substitutions
Used to translate between Spans and byte positions within a single output line in highlighted
code of structured suggestions.
A single-threaded reference-counting pointer. ‘Rc’ stands for ‘Reference Counted’.
An integer that is known not to equal zero.
Enums
Indicates the confidence in the correctness of a suggestion.
The set of available colors for the terminal foreground/background.
Represents a json value
A key denoting where from a diagnostic was stashed.
A clone-on-write smart pointer.
Statics
Traits
Trait for types that can be deserialized
Trait for types that can be serialized
A hashable type.
A trait for hashing an arbitrary stream of bytes.