errors: introduce DecorateLint
Add a new trait to be generated by diagnostic derives which uses a `LintDiagnosticBuilder`. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
2874f09534
commit
540eaf985d
6 changed files with 58 additions and 6 deletions
|
@ -414,7 +414,7 @@ impl LateLintPass<'_> for Diagnostics {
|
|||
let Impl { of_trait: Some(of_trait), .. } = impl_ &&
|
||||
let Some(def_id) = of_trait.trait_def_id() &&
|
||||
let Some(name) = cx.tcx.get_diagnostic_name(def_id) &&
|
||||
matches!(name, sym::SessionDiagnostic | sym::AddSubdiagnostic)
|
||||
matches!(name, sym::SessionDiagnostic | sym::AddSubdiagnostic | sym::DecorateLint)
|
||||
{
|
||||
found_impl = true;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue