@@ -4,7 +4,7 @@ use rustc_session::{lint::Level, parse::ParseSess, SessionDiagnostic};
4
4
use rustc_span:: { Span , Symbol } ;
5
5
6
6
#[ derive( SessionDiagnostic ) ]
7
- #[ error ( lint:: overruled_attribute, code = "E0453" ) ]
7
+ #[ diag ( lint:: overruled_attribute, code = "E0453" ) ]
8
8
pub struct OverruledAttribute {
9
9
#[ primary_span]
10
10
pub span : Span ,
@@ -43,7 +43,7 @@ impl AddSubdiagnostic for OverruledAttributeSub {
43
43
}
44
44
45
45
#[ derive( SessionDiagnostic ) ]
46
- #[ error ( lint:: malformed_attribute, code = "E0452" ) ]
46
+ #[ diag ( lint:: malformed_attribute, code = "E0452" ) ]
47
47
pub struct MalformedAttribute {
48
48
#[ primary_span]
49
49
pub span : Span ,
@@ -62,7 +62,7 @@ pub enum MalformedAttributeSub {
62
62
}
63
63
64
64
#[ derive( SessionDiagnostic ) ]
65
- #[ error ( lint:: unknown_tool_in_scoped_lint, code = "E0710" ) ]
65
+ #[ diag ( lint:: unknown_tool_in_scoped_lint, code = "E0710" ) ]
66
66
pub struct UnknownToolInScopedLint {
67
67
#[ primary_span]
68
68
pub span : Option < Span > ,
@@ -73,7 +73,7 @@ pub struct UnknownToolInScopedLint {
73
73
}
74
74
75
75
#[ derive( SessionDiagnostic ) ]
76
- #[ error ( lint:: builtin_ellipsis_inclusive_range_patterns, code = "E0783" ) ]
76
+ #[ diag ( lint:: builtin_ellipsis_inclusive_range_patterns, code = "E0783" ) ]
77
77
pub struct BuiltinEllpisisInclusiveRangePatterns {
78
78
#[ primary_span]
79
79
pub span : Span ,
@@ -108,7 +108,7 @@ impl AddSubdiagnostic for RequestedLevel {
108
108
}
109
109
110
110
#[ derive( SessionDiagnostic ) ]
111
- #[ error ( lint:: unsupported_group, code = "E0602" ) ]
111
+ #[ diag ( lint:: unsupported_group, code = "E0602" ) ]
112
112
pub struct UnsupportedGroup {
113
113
pub lint_group : String ,
114
114
}
@@ -137,23 +137,23 @@ impl SessionDiagnostic<'_> for CheckNameUnknown {
137
137
}
138
138
139
139
#[ derive( SessionDiagnostic ) ]
140
- #[ error ( lint:: check_name_unknown_tool, code = "E0602" ) ]
140
+ #[ diag ( lint:: check_name_unknown_tool, code = "E0602" ) ]
141
141
pub struct CheckNameUnknownTool {
142
142
pub tool_name : Symbol ,
143
143
#[ subdiagnostic]
144
144
pub sub : RequestedLevel ,
145
145
}
146
146
147
147
#[ derive( SessionDiagnostic ) ]
148
- #[ warning ( lint:: check_name_warning) ]
148
+ #[ diag ( lint:: check_name_warning) ]
149
149
pub struct CheckNameWarning {
150
150
pub msg : String ,
151
151
#[ subdiagnostic]
152
152
pub sub : RequestedLevel ,
153
153
}
154
154
155
155
#[ derive( SessionDiagnostic ) ]
156
- #[ warning ( lint:: check_name_deprecated) ]
156
+ #[ diag ( lint:: check_name_deprecated) ]
157
157
pub struct CheckNameDeprecated {
158
158
pub lint_name : String ,
159
159
pub new_name : String ,
0 commit comments