Skip to main content

Module emitter

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 ๐Ÿ”’
EmitterWithNote
An emitter that adds a note to each diagnostic.
HumanReadableErrorType
Describes the way the content of the rendered field of the json output is generated
SilentEmitter

Enumsยง

ColorConfig
ConfusionType
Represents the type of confusion detected between original and suggested code.
OutputTheme
TimingEvent

Constantsยง

BRIGHT_BLUE ๐Ÿ”’
On Windows, BRIGHT_BLUE is hard to read on black. Use cyan instead.
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.
get_stderr_color_choice
is_different
Whether the original and suggested code are the same.
normalize_whitespace ๐Ÿ”’
should_show_source_code ๐Ÿ”’
stderr_destination

Type Aliasesยง

Destination
DynEmitter