mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
9d864c8d56
`SessionDiagnostic` isn't suitable for use on lints as whether or not it creates an error or a warning is decided at compile-time by the macro, whereas lints decide this at runtime based on the location of the lint being reported (as it will depend on the user's `allow`/`deny` attributes, etc). Re-using most of the machinery for `SessionDiagnostic`, this macro introduces a `LintDiagnostic` derive which implements a `DecorateLint` trait, taking a `LintDiagnosticBuilder` and adding to the lint according to the diagnostic struct. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |