@@ -7,7 +7,7 @@ use rustc_span::{Span, Symbol};
77use crate :: ast_validation:: ForbiddenLetReason ;
88
99#[ derive( SessionDiagnostic ) ]
10- #[ error ( ast_passes:: forbidden_let) ]
10+ #[ diag ( ast_passes:: forbidden_let) ]
1111#[ note]
1212pub struct ForbiddenLet {
1313 #[ primary_span]
@@ -31,29 +31,29 @@ impl AddSubdiagnostic for ForbiddenLetReason {
3131}
3232
3333#[ derive( SessionDiagnostic ) ]
34- #[ error ( ast_passes:: forbidden_assoc_constraint) ]
34+ #[ diag ( ast_passes:: forbidden_assoc_constraint) ]
3535pub struct ForbiddenAssocConstraint {
3636 #[ primary_span]
3737 pub span : Span ,
3838}
3939
4040#[ derive( SessionDiagnostic ) ]
41- #[ error ( ast_passes:: keyword_lifetime) ]
41+ #[ diag ( ast_passes:: keyword_lifetime) ]
4242pub struct KeywordLifetime {
4343 #[ primary_span]
4444 pub span : Span ,
4545}
4646
4747#[ derive( SessionDiagnostic ) ]
48- #[ error ( ast_passes:: invalid_label) ]
48+ #[ diag ( ast_passes:: invalid_label) ]
4949pub struct InvalidLabel {
5050 #[ primary_span]
5151 pub span : Span ,
5252 pub name : Symbol ,
5353}
5454
5555#[ derive( SessionDiagnostic ) ]
56- #[ error ( ast_passes:: invalid_visibility, code = "E0449" ) ]
56+ #[ diag ( ast_passes:: invalid_visibility, code = "E0449" ) ]
5757pub struct InvalidVisibility {
5858 #[ primary_span]
5959 pub span : Span ,
@@ -72,7 +72,7 @@ pub enum InvalidVisibilityNote {
7272}
7373
7474#[ derive( SessionDiagnostic ) ]
75- #[ error ( ast_passes:: trait_fn_async, code = "E0706" ) ]
75+ #[ diag ( ast_passes:: trait_fn_async, code = "E0706" ) ]
7676#[ note]
7777#[ note( ast_passes:: note2) ]
7878pub struct TraitFnAsync {
@@ -83,66 +83,66 @@ pub struct TraitFnAsync {
8383}
8484
8585#[ derive( SessionDiagnostic ) ]
86- #[ error ( ast_passes:: trait_fn_const, code = "E0379" ) ]
86+ #[ diag ( ast_passes:: trait_fn_const, code = "E0379" ) ]
8787pub struct TraitFnConst {
8888 #[ primary_span]
8989 #[ label]
9090 pub span : Span ,
9191}
9292
9393#[ derive( SessionDiagnostic ) ]
94- #[ error ( ast_passes:: forbidden_lifetime_bound) ]
94+ #[ diag ( ast_passes:: forbidden_lifetime_bound) ]
9595pub struct ForbiddenLifetimeBound {
9696 #[ primary_span]
9797 pub spans : Vec < Span > ,
9898}
9999
100100#[ derive( SessionDiagnostic ) ]
101- #[ error ( ast_passes:: forbidden_non_lifetime_param) ]
101+ #[ diag ( ast_passes:: forbidden_non_lifetime_param) ]
102102pub struct ForbiddenNonLifetimeParam {
103103 #[ primary_span]
104104 pub spans : Vec < Span > ,
105105}
106106
107107#[ derive( SessionDiagnostic ) ]
108- #[ fatal ( ast_passes:: fn_param_too_many) ]
108+ #[ diag ( ast_passes:: fn_param_too_many) ]
109109pub struct FnParamTooMany {
110110 #[ primary_span]
111111 pub span : Span ,
112112 pub max_num_args : usize ,
113113}
114114
115115#[ derive( SessionDiagnostic ) ]
116- #[ error ( ast_passes:: fn_param_c_var_args_only) ]
116+ #[ diag ( ast_passes:: fn_param_c_var_args_only) ]
117117pub struct FnParamCVarArgsOnly {
118118 #[ primary_span]
119119 pub span : Span ,
120120}
121121
122122#[ derive( SessionDiagnostic ) ]
123- #[ error ( ast_passes:: fn_param_c_var_args_not_last) ]
123+ #[ diag ( ast_passes:: fn_param_c_var_args_not_last) ]
124124pub struct FnParamCVarArgsNotLast {
125125 #[ primary_span]
126126 pub span : Span ,
127127}
128128
129129#[ derive( SessionDiagnostic ) ]
130- #[ error ( ast_passes:: fn_param_doc_comment) ]
130+ #[ diag ( ast_passes:: fn_param_doc_comment) ]
131131pub struct FnParamDocComment {
132132 #[ primary_span]
133133 #[ label]
134134 pub span : Span ,
135135}
136136
137137#[ derive( SessionDiagnostic ) ]
138- #[ error ( ast_passes:: fn_param_forbidden_attr) ]
138+ #[ diag ( ast_passes:: fn_param_forbidden_attr) ]
139139pub struct FnParamForbiddenAttr {
140140 #[ primary_span]
141141 pub span : Span ,
142142}
143143
144144#[ derive( SessionDiagnostic ) ]
145- #[ error ( ast_passes:: fn_param_forbidden_self) ]
145+ #[ diag ( ast_passes:: fn_param_forbidden_self) ]
146146#[ note]
147147pub struct FnParamForbiddenSelf {
148148 #[ primary_span]
@@ -151,7 +151,7 @@ pub struct FnParamForbiddenSelf {
151151}
152152
153153#[ derive( SessionDiagnostic ) ]
154- #[ error ( ast_passes:: forbidden_default) ]
154+ #[ diag ( ast_passes:: forbidden_default) ]
155155pub struct ForbiddenDefault {
156156 #[ primary_span]
157157 pub span : Span ,
@@ -160,7 +160,7 @@ pub struct ForbiddenDefault {
160160}
161161
162162#[ derive( SessionDiagnostic ) ]
163- #[ error ( ast_passes:: assoc_const_without_body) ]
163+ #[ diag ( ast_passes:: assoc_const_without_body) ]
164164pub struct AssocConstWithoutBody {
165165 #[ primary_span]
166166 pub span : Span ,
@@ -169,7 +169,7 @@ pub struct AssocConstWithoutBody {
169169}
170170
171171#[ derive( SessionDiagnostic ) ]
172- #[ error ( ast_passes:: assoc_fn_without_body) ]
172+ #[ diag ( ast_passes:: assoc_fn_without_body) ]
173173pub struct AssocFnWithoutBody {
174174 #[ primary_span]
175175 pub span : Span ,
@@ -178,7 +178,7 @@ pub struct AssocFnWithoutBody {
178178}
179179
180180#[ derive( SessionDiagnostic ) ]
181- #[ error ( ast_passes:: assoc_type_without_body) ]
181+ #[ diag ( ast_passes:: assoc_type_without_body) ]
182182pub struct AssocTypeWithoutBody {
183183 #[ primary_span]
184184 pub span : Span ,
@@ -187,7 +187,7 @@ pub struct AssocTypeWithoutBody {
187187}
188188
189189#[ derive( SessionDiagnostic ) ]
190- #[ error ( ast_passes:: const_without_body) ]
190+ #[ diag ( ast_passes:: const_without_body) ]
191191pub struct ConstWithoutBody {
192192 #[ primary_span]
193193 pub span : Span ,
@@ -196,7 +196,7 @@ pub struct ConstWithoutBody {
196196}
197197
198198#[ derive( SessionDiagnostic ) ]
199- #[ error ( ast_passes:: static_without_body) ]
199+ #[ diag ( ast_passes:: static_without_body) ]
200200pub struct StaticWithoutBody {
201201 #[ primary_span]
202202 pub span : Span ,
@@ -205,7 +205,7 @@ pub struct StaticWithoutBody {
205205}
206206
207207#[ derive( SessionDiagnostic ) ]
208- #[ error ( ast_passes:: ty_alias_without_body) ]
208+ #[ diag ( ast_passes:: ty_alias_without_body) ]
209209pub struct TyAliasWithoutBody {
210210 #[ primary_span]
211211 pub span : Span ,
@@ -214,7 +214,7 @@ pub struct TyAliasWithoutBody {
214214}
215215
216216#[ derive( SessionDiagnostic ) ]
217- #[ error ( ast_passes:: fn_without_body) ]
217+ #[ diag ( ast_passes:: fn_without_body) ]
218218pub struct FnWithoutBody {
219219 #[ primary_span]
220220 pub span : Span ,
0 commit comments