@@ -7,7 +7,7 @@ use rustc_span::{Span, Symbol};
7
7
use crate :: ast_validation:: ForbiddenLetReason ;
8
8
9
9
#[ derive( SessionDiagnostic ) ]
10
- #[ error ( ast_passes:: forbidden_let) ]
10
+ #[ diag ( ast_passes:: forbidden_let) ]
11
11
#[ note]
12
12
pub struct ForbiddenLet {
13
13
#[ primary_span]
@@ -31,29 +31,29 @@ impl AddSubdiagnostic for ForbiddenLetReason {
31
31
}
32
32
33
33
#[ derive( SessionDiagnostic ) ]
34
- #[ error ( ast_passes:: forbidden_assoc_constraint) ]
34
+ #[ diag ( ast_passes:: forbidden_assoc_constraint) ]
35
35
pub struct ForbiddenAssocConstraint {
36
36
#[ primary_span]
37
37
pub span : Span ,
38
38
}
39
39
40
40
#[ derive( SessionDiagnostic ) ]
41
- #[ error ( ast_passes:: keyword_lifetime) ]
41
+ #[ diag ( ast_passes:: keyword_lifetime) ]
42
42
pub struct KeywordLifetime {
43
43
#[ primary_span]
44
44
pub span : Span ,
45
45
}
46
46
47
47
#[ derive( SessionDiagnostic ) ]
48
- #[ error ( ast_passes:: invalid_label) ]
48
+ #[ diag ( ast_passes:: invalid_label) ]
49
49
pub struct InvalidLabel {
50
50
#[ primary_span]
51
51
pub span : Span ,
52
52
pub name : Symbol ,
53
53
}
54
54
55
55
#[ derive( SessionDiagnostic ) ]
56
- #[ error ( ast_passes:: invalid_visibility, code = "E0449" ) ]
56
+ #[ diag ( ast_passes:: invalid_visibility, code = "E0449" ) ]
57
57
pub struct InvalidVisibility {
58
58
#[ primary_span]
59
59
pub span : Span ,
@@ -72,7 +72,7 @@ pub enum InvalidVisibilityNote {
72
72
}
73
73
74
74
#[ derive( SessionDiagnostic ) ]
75
- #[ error ( ast_passes:: trait_fn_async, code = "E0706" ) ]
75
+ #[ diag ( ast_passes:: trait_fn_async, code = "E0706" ) ]
76
76
#[ note]
77
77
#[ note( ast_passes:: note2) ]
78
78
pub struct TraitFnAsync {
@@ -83,66 +83,66 @@ pub struct TraitFnAsync {
83
83
}
84
84
85
85
#[ derive( SessionDiagnostic ) ]
86
- #[ error ( ast_passes:: trait_fn_const, code = "E0379" ) ]
86
+ #[ diag ( ast_passes:: trait_fn_const, code = "E0379" ) ]
87
87
pub struct TraitFnConst {
88
88
#[ primary_span]
89
89
#[ label]
90
90
pub span : Span ,
91
91
}
92
92
93
93
#[ derive( SessionDiagnostic ) ]
94
- #[ error ( ast_passes:: forbidden_lifetime_bound) ]
94
+ #[ diag ( ast_passes:: forbidden_lifetime_bound) ]
95
95
pub struct ForbiddenLifetimeBound {
96
96
#[ primary_span]
97
97
pub spans : Vec < Span > ,
98
98
}
99
99
100
100
#[ derive( SessionDiagnostic ) ]
101
- #[ error ( ast_passes:: forbidden_non_lifetime_param) ]
101
+ #[ diag ( ast_passes:: forbidden_non_lifetime_param) ]
102
102
pub struct ForbiddenNonLifetimeParam {
103
103
#[ primary_span]
104
104
pub spans : Vec < Span > ,
105
105
}
106
106
107
107
#[ derive( SessionDiagnostic ) ]
108
- #[ fatal ( ast_passes:: fn_param_too_many) ]
108
+ #[ diag ( ast_passes:: fn_param_too_many) ]
109
109
pub struct FnParamTooMany {
110
110
#[ primary_span]
111
111
pub span : Span ,
112
112
pub max_num_args : usize ,
113
113
}
114
114
115
115
#[ derive( SessionDiagnostic ) ]
116
- #[ error ( ast_passes:: fn_param_c_var_args_only) ]
116
+ #[ diag ( ast_passes:: fn_param_c_var_args_only) ]
117
117
pub struct FnParamCVarArgsOnly {
118
118
#[ primary_span]
119
119
pub span : Span ,
120
120
}
121
121
122
122
#[ derive( SessionDiagnostic ) ]
123
- #[ error ( ast_passes:: fn_param_c_var_args_not_last) ]
123
+ #[ diag ( ast_passes:: fn_param_c_var_args_not_last) ]
124
124
pub struct FnParamCVarArgsNotLast {
125
125
#[ primary_span]
126
126
pub span : Span ,
127
127
}
128
128
129
129
#[ derive( SessionDiagnostic ) ]
130
- #[ error ( ast_passes:: fn_param_doc_comment) ]
130
+ #[ diag ( ast_passes:: fn_param_doc_comment) ]
131
131
pub struct FnParamDocComment {
132
132
#[ primary_span]
133
133
#[ label]
134
134
pub span : Span ,
135
135
}
136
136
137
137
#[ derive( SessionDiagnostic ) ]
138
- #[ error ( ast_passes:: fn_param_forbidden_attr) ]
138
+ #[ diag ( ast_passes:: fn_param_forbidden_attr) ]
139
139
pub struct FnParamForbiddenAttr {
140
140
#[ primary_span]
141
141
pub span : Span ,
142
142
}
143
143
144
144
#[ derive( SessionDiagnostic ) ]
145
- #[ error ( ast_passes:: fn_param_forbidden_self) ]
145
+ #[ diag ( ast_passes:: fn_param_forbidden_self) ]
146
146
#[ note]
147
147
pub struct FnParamForbiddenSelf {
148
148
#[ primary_span]
@@ -151,7 +151,7 @@ pub struct FnParamForbiddenSelf {
151
151
}
152
152
153
153
#[ derive( SessionDiagnostic ) ]
154
- #[ error ( ast_passes:: forbidden_default) ]
154
+ #[ diag ( ast_passes:: forbidden_default) ]
155
155
pub struct ForbiddenDefault {
156
156
#[ primary_span]
157
157
pub span : Span ,
@@ -160,7 +160,7 @@ pub struct ForbiddenDefault {
160
160
}
161
161
162
162
#[ derive( SessionDiagnostic ) ]
163
- #[ error ( ast_passes:: assoc_const_without_body) ]
163
+ #[ diag ( ast_passes:: assoc_const_without_body) ]
164
164
pub struct AssocConstWithoutBody {
165
165
#[ primary_span]
166
166
pub span : Span ,
@@ -169,7 +169,7 @@ pub struct AssocConstWithoutBody {
169
169
}
170
170
171
171
#[ derive( SessionDiagnostic ) ]
172
- #[ error ( ast_passes:: assoc_fn_without_body) ]
172
+ #[ diag ( ast_passes:: assoc_fn_without_body) ]
173
173
pub struct AssocFnWithoutBody {
174
174
#[ primary_span]
175
175
pub span : Span ,
@@ -178,7 +178,7 @@ pub struct AssocFnWithoutBody {
178
178
}
179
179
180
180
#[ derive( SessionDiagnostic ) ]
181
- #[ error ( ast_passes:: assoc_type_without_body) ]
181
+ #[ diag ( ast_passes:: assoc_type_without_body) ]
182
182
pub struct AssocTypeWithoutBody {
183
183
#[ primary_span]
184
184
pub span : Span ,
@@ -187,7 +187,7 @@ pub struct AssocTypeWithoutBody {
187
187
}
188
188
189
189
#[ derive( SessionDiagnostic ) ]
190
- #[ error ( ast_passes:: const_without_body) ]
190
+ #[ diag ( ast_passes:: const_without_body) ]
191
191
pub struct ConstWithoutBody {
192
192
#[ primary_span]
193
193
pub span : Span ,
@@ -196,7 +196,7 @@ pub struct ConstWithoutBody {
196
196
}
197
197
198
198
#[ derive( SessionDiagnostic ) ]
199
- #[ error ( ast_passes:: static_without_body) ]
199
+ #[ diag ( ast_passes:: static_without_body) ]
200
200
pub struct StaticWithoutBody {
201
201
#[ primary_span]
202
202
pub span : Span ,
@@ -205,7 +205,7 @@ pub struct StaticWithoutBody {
205
205
}
206
206
207
207
#[ derive( SessionDiagnostic ) ]
208
- #[ error ( ast_passes:: ty_alias_without_body) ]
208
+ #[ diag ( ast_passes:: ty_alias_without_body) ]
209
209
pub struct TyAliasWithoutBody {
210
210
#[ primary_span]
211
211
pub span : Span ,
@@ -214,7 +214,7 @@ pub struct TyAliasWithoutBody {
214
214
}
215
215
216
216
#[ derive( SessionDiagnostic ) ]
217
- #[ error ( ast_passes:: fn_without_body) ]
217
+ #[ diag ( ast_passes:: fn_without_body) ]
218
218
pub struct FnWithoutBody {
219
219
#[ primary_span]
220
220
pub span : Span ,
0 commit comments