@@ -5,8 +5,8 @@ use std::num::NonZero;
55use crate :: errors:: RequestedLevel ;
66use crate :: fluent_generated as fluent;
77use rustc_errors:: {
8- codes:: * , Applicability , DecorateLint , Diag , DiagMessage , DiagStyledString , EmissionGuarantee ,
9- SubdiagMessageOp , Subdiagnostic , SuggestionStyle ,
8+ codes:: * , Applicability , Diag , DiagMessage , DiagStyledString , EmissionGuarantee ,
9+ LintDiagnostic , SubdiagMessageOp , Subdiagnostic , SuggestionStyle ,
1010} ;
1111use rustc_hir:: def_id:: DefId ;
1212use rustc_macros:: { LintDiagnostic , Subdiagnostic } ;
@@ -136,7 +136,7 @@ pub struct BuiltinMissingDebugImpl<'a> {
136136}
137137
138138// Needed for def_path_str
139- impl < ' a > DecorateLint < ' a , ( ) > for BuiltinMissingDebugImpl < ' _ > {
139+ impl < ' a > LintDiagnostic < ' a , ( ) > for BuiltinMissingDebugImpl < ' _ > {
140140 fn decorate_lint < ' b > ( self , diag : & ' b mut rustc_errors:: Diag < ' a , ( ) > ) {
141141 diag. arg ( "debug" , self . tcx . def_path_str ( self . def_id ) ) ;
142142 }
@@ -241,7 +241,7 @@ pub struct BuiltinUngatedAsyncFnTrackCaller<'a> {
241241 pub session : & ' a Session ,
242242}
243243
244- impl < ' a > DecorateLint < ' a , ( ) > for BuiltinUngatedAsyncFnTrackCaller < ' _ > {
244+ impl < ' a > LintDiagnostic < ' a , ( ) > for BuiltinUngatedAsyncFnTrackCaller < ' _ > {
245245 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
246246 diag. span_label ( self . label , fluent:: lint_label) ;
247247 rustc_session:: parse:: add_feature_diagnostics (
@@ -423,7 +423,7 @@ pub struct BuiltinUnpermittedTypeInit<'a> {
423423 pub tcx : TyCtxt < ' a > ,
424424}
425425
426- impl < ' a > DecorateLint < ' a , ( ) > for BuiltinUnpermittedTypeInit < ' _ > {
426+ impl < ' a > LintDiagnostic < ' a , ( ) > for BuiltinUnpermittedTypeInit < ' _ > {
427427 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
428428 diag. arg ( "ty" , self . ty ) ;
429429 diag. span_label ( self . label , fluent:: lint_builtin_unpermitted_type_init_label) ;
@@ -1159,7 +1159,7 @@ pub struct NonFmtPanicUnused {
11591159}
11601160
11611161// Used because of two suggestions based on one Option<Span>
1162- impl < ' a > DecorateLint < ' a , ( ) > for NonFmtPanicUnused {
1162+ impl < ' a > LintDiagnostic < ' a , ( ) > for NonFmtPanicUnused {
11631163 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
11641164 diag. arg ( "count" , self . count ) ;
11651165 diag. note ( fluent:: lint_note) ;
@@ -1397,7 +1397,7 @@ pub struct DropTraitConstraintsDiag<'a> {
13971397}
13981398
13991399// Needed for def_path_str
1400- impl < ' a > DecorateLint < ' a , ( ) > for DropTraitConstraintsDiag < ' _ > {
1400+ impl < ' a > LintDiagnostic < ' a , ( ) > for DropTraitConstraintsDiag < ' _ > {
14011401 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
14021402 diag. arg ( "predicate" , self . predicate ) ;
14031403 diag. arg ( "needs_drop" , self . tcx . def_path_str ( self . def_id ) ) ;
@@ -1414,7 +1414,7 @@ pub struct DropGlue<'a> {
14141414}
14151415
14161416// Needed for def_path_str
1417- impl < ' a > DecorateLint < ' a , ( ) > for DropGlue < ' _ > {
1417+ impl < ' a > LintDiagnostic < ' a , ( ) > for DropGlue < ' _ > {
14181418 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
14191419 diag. arg ( "needs_drop" , self . tcx . def_path_str ( self . def_id ) ) ;
14201420 }
@@ -1689,7 +1689,7 @@ pub struct ImproperCTypes<'a> {
16891689}
16901690
16911691// Used because of the complexity of Option<DiagMessage>, DiagMessage, and Option<Span>
1692- impl < ' a > DecorateLint < ' a , ( ) > for ImproperCTypes < ' _ > {
1692+ impl < ' a > LintDiagnostic < ' a , ( ) > for ImproperCTypes < ' _ > {
16931693 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
16941694 diag. arg ( "ty" , self . ty ) ;
16951695 diag. arg ( "desc" , self . desc ) ;
@@ -1832,7 +1832,7 @@ pub enum UnusedDefSuggestion {
18321832}
18331833
18341834// Needed because of def_path_str
1835- impl < ' a > DecorateLint < ' a , ( ) > for UnusedDef < ' _ , ' _ > {
1835+ impl < ' a > LintDiagnostic < ' a , ( ) > for UnusedDef < ' _ , ' _ > {
18361836 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
18371837 diag. arg ( "pre" , self . pre ) ;
18381838 diag. arg ( "post" , self . post ) ;
@@ -1915,7 +1915,7 @@ pub struct AsyncFnInTraitDiag {
19151915 pub sugg : Option < Vec < ( Span , String ) > > ,
19161916}
19171917
1918- impl < ' a > DecorateLint < ' a , ( ) > for AsyncFnInTraitDiag {
1918+ impl < ' a > LintDiagnostic < ' a , ( ) > for AsyncFnInTraitDiag {
19191919 fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
19201920 diag. note ( fluent:: lint_note) ;
19211921 if let Some ( sugg) = self . sugg {
0 commit comments