diff options
| author | David Wood <david.wood@huawei.com> | 2022-06-30 08:57:45 +0100 |
|---|---|---|
| committer | David Wood <david.wood@huawei.com> | 2022-07-05 16:00:21 +0100 |
| commit | 9d864c8d56fee09abae2be2bed1d4dc1a86b457b (patch) | |
| tree | 2a579870a01f5273c26b34f2f3d567e3c9b6b3e5 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 7f9d8480d665b8dcc7b1359372e394d455b6e29a (diff) | |
| download | rust-9d864c8d56fee09abae2be2bed1d4dc1a86b457b.tar.gz rust-9d864c8d56fee09abae2be2bed1d4dc1a86b457b.zip | |
macros: add diagnostic derive for lints
`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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
