Module rustc_errors::diagnostic
source · Structs
- A “sub”-diagnostic attached to a parent diagnostic. For example, a note attached to an error.
- Error type for
Diagnostic
’ssuggestions
field, indicating that.disable_suggestions()
was called on theDiagnostic
.
Enums
- Simplified version of
FluentValue
that can implementEncodable
andDecodable
. Converted to aFluentValue
by the emitter to be used in diagnostic translation.
Traits
- Trait implemented by error types. This should not be implemented manually. Instead, use
#[derive(Subdiagnostic)]
– see rustc_macros::Subdiagnostic. - Trait implemented by lint types. This should not be implemented manually. Instead, use
#[derive(LintDiagnostic)]
– see rustc_macros::LintDiagnostic. - Converts a value of a type into a
DiagnosticArg
(typically a field of anIntoDiagnostic
struct). Implemented as a custom trait rather thanFrom
so that it is implemented on the type being converted rather than onDiagnosticArgValue
, which enables types from otherrustc_*
crates to implement this.
Type Aliases
- Simplified version of
FluentArg
that can implementEncodable
andDecodable
. Collection ofDiagnosticArg
are converted toFluentArgs
(consuming the collection) at the start of diagnostic emission. - Name of a diagnostic argument.