Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Copy of compiler/rustc_macros/src/diagnostics from rustc 8925ea358 (nightly-2026-08-21).

Keep this as close to upstream as possible so syncing is a plain diff. Local changes are marked with // flux: comments.

Modulesยง

diagnostic ๐Ÿ”’
diagnostic_builder ๐Ÿ”’
error ๐Ÿ”’
message ๐Ÿ”’
msg_macro ๐Ÿ”’
subdiagnostic ๐Ÿ”’
utils ๐Ÿ”’

Functionsยง

diagnostic_derive ๐Ÿ”’
Implements #[derive(Diagnostic)], which allows for errors to be specified as a struct, independent from the actual diagnostics emitting code.
subdiagnostic_derive ๐Ÿ”’
Implements #[derive(Subdiagnostic)], which allows for labels, notes, helps and suggestions to be specified as a structs or enums, independent from the actual diagnostics emitting code or diagnostic derives.