Module 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 ๐Ÿ”’
FatalOnlyEmitter
An emitter that does nothing when emitting a non-fatal diagnostic. Fatal diagnostics are forwarded to fatal_emitter to avoid silent failures of rustc, as witnessed e.g. in issue #89358.
FileWithAnnotatedLines ๐Ÿ”’
HumanEmitter
Handles the writing of HumanReadableErrorType::Default and HumanReadableErrorType::Short
Margin ๐Ÿ”’
SilentEmitter
UnderlineParts ๐Ÿ”’

Enumsยง

ColorConfig
ConfusionType
Represents the type of confusion detected between original and suggested code.
DisplaySuggestion ๐Ÿ”’
HumanReadableErrorType
Describes the way the content of the rendered field of the json output is generated
OutputTheme
TimingEvent

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.
MAX_SUGGESTIONS
Maximum number of suggestions to be shown
OUTPUT_REPLACEMENTS ๐Ÿ”’

Traitsยง

Emitter
Emitter trait for emitting errors and other structured information.

Functionsยง

detect_confusion_type
Whether the original and suggested code are visually similar enough to warrant extra wording.
emit_to_destination ๐Ÿ”’
is_different
Whether the original and suggested code are the same.
normalize_whitespace ๐Ÿ”’
num_decimal_digits ๐Ÿ”’
num_overlap ๐Ÿ”’
overlaps ๐Ÿ”’
should_show_source_code ๐Ÿ”’
stderr_destination

Type Aliasesยง

Destination
DynEmitter
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy