@@ -3,10 +3,10 @@ use std::borrow::Cow;
33use rustc_ast:: ast;
44use rustc_errors:: codes:: * ;
55use rustc_hir:: limit:: Limit ;
6- use rustc_macros:: { Diagnostic , LintDiagnostic , Subdiagnostic } ;
6+ use rustc_macros:: { Diagnostic , Subdiagnostic } ;
77use rustc_span:: { Ident , MacroRulesNormalizedIdent , Span , Symbol } ;
88
9- #[ derive( LintDiagnostic ) ]
9+ #[ derive( Diagnostic ) ]
1010#[ diag( "`#[cfg_attr]` does not expand to any attributes" ) ]
1111pub ( crate ) struct CfgAttrNoAttributes ;
1212
@@ -94,15 +94,15 @@ pub(crate) struct MacroVarStillRepeating {
9494 pub ident : MacroRulesNormalizedIdent ,
9595}
9696
97- #[ derive( LintDiagnostic ) ]
97+ #[ derive( Diagnostic ) ]
9898#[ diag( "variable `{$ident}` is still repeating at this depth" ) ]
9999pub ( crate ) struct MetaVarStillRepeatingLint {
100100 #[ label( "expected repetition" ) ]
101101 pub label : Span ,
102102 pub ident : MacroRulesNormalizedIdent ,
103103}
104104
105- #[ derive( LintDiagnostic ) ]
105+ #[ derive( Diagnostic ) ]
106106#[ diag( "meta-variable repeats with different Kleene operator" ) ]
107107pub ( crate ) struct MetaVariableWrongOperator {
108108 #[ label( "expected repetition" ) ]
@@ -119,7 +119,7 @@ pub(crate) struct MetaVarsDifSeqMatchers {
119119 pub msg : String ,
120120}
121121
122- #[ derive( LintDiagnostic ) ]
122+ #[ derive( Diagnostic ) ]
123123#[ diag( "unknown macro variable `{$name}`" ) ]
124124pub ( crate ) struct UnknownMacroVariable {
125125 pub name : MacroRulesNormalizedIdent ,
@@ -391,7 +391,7 @@ pub(crate) struct DuplicateMatcherBinding {
391391 pub prev : Span ,
392392}
393393
394- #[ derive( LintDiagnostic ) ]
394+ #[ derive( Diagnostic ) ]
395395#[ diag( "duplicate matcher binding" ) ]
396396pub ( crate ) struct DuplicateMatcherBindingLint {
397397 #[ label( "duplicate binding" ) ]
@@ -569,7 +569,7 @@ pub(crate) struct MacroArgsBadDelimSugg {
569569 pub close : Span ,
570570}
571571
572- #[ derive( LintDiagnostic ) ]
572+ #[ derive( Diagnostic ) ]
573573#[ diag( "unused doc comment" ) ]
574574#[ help(
575575 "to document an item produced by a macro, the macro must produce the documentation as part of its expansion"
@@ -579,7 +579,7 @@ pub(crate) struct MacroCallUnusedDocComment {
579579 pub span : Span ,
580580}
581581
582- #[ derive( LintDiagnostic ) ]
582+ #[ derive( Diagnostic ) ]
583583#[ diag(
584584 "the meaning of the `pat` fragment specifier is changing in Rust 2021, which may affect this macro"
585585) ]
@@ -593,7 +593,7 @@ pub(crate) struct OrPatternsBackCompat {
593593 pub suggestion : String ,
594594}
595595
596- #[ derive( LintDiagnostic ) ]
596+ #[ derive( Diagnostic ) ]
597597#[ diag( "trailing semicolon in macro used in expression position" ) ]
598598pub ( crate ) struct TrailingMacro {
599599 #[ note( "macro invocations at the end of a block are treated as expressions" ) ]
@@ -604,7 +604,7 @@ pub(crate) struct TrailingMacro {
604604 pub name : Ident ,
605605}
606606
607- #[ derive( LintDiagnostic ) ]
607+ #[ derive( Diagnostic ) ]
608608#[ diag( "unused attribute `{$attr_name}`" ) ]
609609pub ( crate ) struct UnusedBuiltinAttribute {
610610 #[ note(
0 commit comments