@@ -5,8 +5,8 @@ use std::num::NonZero;
5
5
use crate :: errors:: RequestedLevel ;
6
6
use crate :: fluent_generated as fluent;
7
7
use 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 ,
10
10
} ;
11
11
use rustc_hir:: def_id:: DefId ;
12
12
use rustc_macros:: { LintDiagnostic , Subdiagnostic } ;
@@ -136,7 +136,7 @@ pub struct BuiltinMissingDebugImpl<'a> {
136
136
}
137
137
138
138
// Needed for def_path_str
139
- impl < ' a > DecorateLint < ' a , ( ) > for BuiltinMissingDebugImpl < ' _ > {
139
+ impl < ' a > LintDiagnostic < ' a , ( ) > for BuiltinMissingDebugImpl < ' _ > {
140
140
fn decorate_lint < ' b > ( self , diag : & ' b mut rustc_errors:: Diag < ' a , ( ) > ) {
141
141
diag. arg ( "debug" , self . tcx . def_path_str ( self . def_id ) ) ;
142
142
}
@@ -241,7 +241,7 @@ pub struct BuiltinUngatedAsyncFnTrackCaller<'a> {
241
241
pub session : & ' a Session ,
242
242
}
243
243
244
- impl < ' a > DecorateLint < ' a , ( ) > for BuiltinUngatedAsyncFnTrackCaller < ' _ > {
244
+ impl < ' a > LintDiagnostic < ' a , ( ) > for BuiltinUngatedAsyncFnTrackCaller < ' _ > {
245
245
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
246
246
diag. span_label ( self . label , fluent:: lint_label) ;
247
247
rustc_session:: parse:: add_feature_diagnostics (
@@ -423,7 +423,7 @@ pub struct BuiltinUnpermittedTypeInit<'a> {
423
423
pub tcx : TyCtxt < ' a > ,
424
424
}
425
425
426
- impl < ' a > DecorateLint < ' a , ( ) > for BuiltinUnpermittedTypeInit < ' _ > {
426
+ impl < ' a > LintDiagnostic < ' a , ( ) > for BuiltinUnpermittedTypeInit < ' _ > {
427
427
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
428
428
diag. arg ( "ty" , self . ty ) ;
429
429
diag. span_label ( self . label , fluent:: lint_builtin_unpermitted_type_init_label) ;
@@ -1159,7 +1159,7 @@ pub struct NonFmtPanicUnused {
1159
1159
}
1160
1160
1161
1161
// Used because of two suggestions based on one Option<Span>
1162
- impl < ' a > DecorateLint < ' a , ( ) > for NonFmtPanicUnused {
1162
+ impl < ' a > LintDiagnostic < ' a , ( ) > for NonFmtPanicUnused {
1163
1163
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
1164
1164
diag. arg ( "count" , self . count ) ;
1165
1165
diag. note ( fluent:: lint_note) ;
@@ -1397,7 +1397,7 @@ pub struct DropTraitConstraintsDiag<'a> {
1397
1397
}
1398
1398
1399
1399
// Needed for def_path_str
1400
- impl < ' a > DecorateLint < ' a , ( ) > for DropTraitConstraintsDiag < ' _ > {
1400
+ impl < ' a > LintDiagnostic < ' a , ( ) > for DropTraitConstraintsDiag < ' _ > {
1401
1401
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
1402
1402
diag. arg ( "predicate" , self . predicate ) ;
1403
1403
diag. arg ( "needs_drop" , self . tcx . def_path_str ( self . def_id ) ) ;
@@ -1414,7 +1414,7 @@ pub struct DropGlue<'a> {
1414
1414
}
1415
1415
1416
1416
// Needed for def_path_str
1417
- impl < ' a > DecorateLint < ' a , ( ) > for DropGlue < ' _ > {
1417
+ impl < ' a > LintDiagnostic < ' a , ( ) > for DropGlue < ' _ > {
1418
1418
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
1419
1419
diag. arg ( "needs_drop" , self . tcx . def_path_str ( self . def_id ) ) ;
1420
1420
}
@@ -1689,7 +1689,7 @@ pub struct ImproperCTypes<'a> {
1689
1689
}
1690
1690
1691
1691
// 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 < ' _ > {
1693
1693
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
1694
1694
diag. arg ( "ty" , self . ty ) ;
1695
1695
diag. arg ( "desc" , self . desc ) ;
@@ -1832,7 +1832,7 @@ pub enum UnusedDefSuggestion {
1832
1832
}
1833
1833
1834
1834
// Needed because of def_path_str
1835
- impl < ' a > DecorateLint < ' a , ( ) > for UnusedDef < ' _ , ' _ > {
1835
+ impl < ' a > LintDiagnostic < ' a , ( ) > for UnusedDef < ' _ , ' _ > {
1836
1836
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
1837
1837
diag. arg ( "pre" , self . pre ) ;
1838
1838
diag. arg ( "post" , self . post ) ;
@@ -1915,7 +1915,7 @@ pub struct AsyncFnInTraitDiag {
1915
1915
pub sugg : Option < Vec < ( Span , String ) > > ,
1916
1916
}
1917
1917
1918
- impl < ' a > DecorateLint < ' a , ( ) > for AsyncFnInTraitDiag {
1918
+ impl < ' a > LintDiagnostic < ' a , ( ) > for AsyncFnInTraitDiag {
1919
1919
fn decorate_lint < ' b > ( self , diag : & ' b mut Diag < ' a , ( ) > ) {
1920
1920
diag. note ( fluent:: lint_note) ;
1921
1921
if let Some ( sugg) = self . sugg {
0 commit comments