Module rustc_errors::emitter
source ยท Expand description
The current rustc diagnostics emitter.
An Emitter
takes care of generating the output from a Diag
struct.
There are various Emitter
implementations that generate different output formats such as
JSON and human readable output.
The output types are defined in rustc_session::config::ErrorOutputType
.
Structsยง
- Buffy ๐
- Handles the writing of
HumanReadableErrorType::Default
andHumanReadableErrorType::Short
- Margin ๐
- An emitter that does nothing when emitting a non-fatal diagnostic. Fatal diagnostics are forwarded to
fatal_dcx
to avoid silent failures of rustc, as witnessed e.g. in issue #89358.
Enumsยง
- DisplaySuggestion ๐
- Describes the way the content of the
rendered
field of the json output is generated
Constantsยง
- ANONYMIZED_LINE_NUM ๐
- BRIGHT_BLUE ๐On Windows, BRIGHT_BLUE is hard to read on black. Use cyan instead.
- DEFAULT_COLUMN_WIDTH ๐Default column width, used in tests and when terminal dimensions cannot be determined.
- Maximum number of suggestions to be shown
- OUTPUT_REPLACEMENTS ๐
Traitsยง
- Emitter trait for emitting errors.
Functionsยง
- draw_col_separator ๐
- draw_multiline_line ๐
- draw_note_separator ๐
- draw_range ๐
- emit_to_destination ๐
- Whether the original and suggested code are visually similar enough to warrant extra wording.
- normalize_whitespace ๐
- num_decimal_digits ๐
- num_overlap ๐
- overlaps ๐