Diagnostic in rustc_errors::json - Rust (original) (raw)
struct Diagnostic {
message: String,
code: Option<DiagnosticCode>,
level: &'static str,
spans: Vec<DiagnosticSpan>,
children: Vec<Diagnostic>,
rendered: Option<String>,
}
The primary error message.
“error: internal compiler error”, “error”, “warning”, “note”, “help”.
Associated diagnostic messages.
The message as rustc would render it.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 152 bytes