Skip to content

Commit 7592fcc

Browse files
committed
Remove unused impls for some diagnostics.
1 parent 586488c commit 7592fcc

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

compiler/rustc_ast_lowering/src/errors.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_errors::{
44
use rustc_macros::{Diagnostic, Subdiagnostic};
55
use rustc_span::{symbol::Ident, Span, Symbol};
66

7-
#[derive(Diagnostic, Clone, Copy)]
7+
#[derive(Diagnostic)]
88
#[diag(ast_lowering_generic_type_with_parentheses, code = E0214)]
99
pub struct GenericTypeWithParentheses {
1010
#[primary_span]
@@ -63,7 +63,7 @@ pub struct InvalidAbiSuggestion {
6363
pub suggestion: String,
6464
}
6565

66-
#[derive(Diagnostic, Clone, Copy)]
66+
#[derive(Diagnostic)]
6767
#[diag(ast_lowering_assoc_ty_parentheses)]
6868
pub struct AssocTyParentheses {
6969
#[primary_span]
@@ -106,23 +106,23 @@ pub struct MisplacedAssocTyBinding {
106106
pub suggestion: Option<Span>,
107107
}
108108

109-
#[derive(Diagnostic, Clone, Copy)]
109+
#[derive(Diagnostic)]
110110
#[diag(ast_lowering_underscore_expr_lhs_assign)]
111111
pub struct UnderscoreExprLhsAssign {
112112
#[primary_span]
113113
#[label]
114114
pub span: Span,
115115
}
116116

117-
#[derive(Diagnostic, Clone, Copy)]
117+
#[derive(Diagnostic)]
118118
#[diag(ast_lowering_base_expression_double_dot, code = E0797)]
119119
pub struct BaseExpressionDoubleDot {
120120
#[primary_span]
121121
#[suggestion(code = "/* expr */", applicability = "has-placeholders", style = "verbose")]
122122
pub span: Span,
123123
}
124124

125-
#[derive(Diagnostic, Clone, Copy)]
125+
#[derive(Diagnostic)]
126126
#[diag(ast_lowering_await_only_in_async_fn_and_blocks, code = E0728)]
127127
pub struct AwaitOnlyInAsyncFnAndBlocks {
128128
#[primary_span]
@@ -132,50 +132,50 @@ pub struct AwaitOnlyInAsyncFnAndBlocks {
132132
pub item_span: Option<Span>,
133133
}
134134

135-
#[derive(Diagnostic, Clone, Copy)]
135+
#[derive(Diagnostic)]
136136
#[diag(ast_lowering_coroutine_too_many_parameters, code = E0628)]
137137
pub struct CoroutineTooManyParameters {
138138
#[primary_span]
139139
pub fn_decl_span: Span,
140140
}
141141

142-
#[derive(Diagnostic, Clone, Copy)]
142+
#[derive(Diagnostic)]
143143
#[diag(ast_lowering_closure_cannot_be_static, code = E0697)]
144144
pub struct ClosureCannotBeStatic {
145145
#[primary_span]
146146
pub fn_decl_span: Span,
147147
}
148148

149-
#[derive(Diagnostic, Clone, Copy)]
149+
#[derive(Diagnostic)]
150150
#[diag(ast_lowering_functional_record_update_destructuring_assignment)]
151151
pub struct FunctionalRecordUpdateDestructuringAssignment {
152152
#[primary_span]
153153
#[suggestion(code = "", applicability = "machine-applicable")]
154154
pub span: Span,
155155
}
156156

157-
#[derive(Diagnostic, Clone, Copy)]
157+
#[derive(Diagnostic)]
158158
#[diag(ast_lowering_async_coroutines_not_supported, code = E0727)]
159159
pub struct AsyncCoroutinesNotSupported {
160160
#[primary_span]
161161
pub span: Span,
162162
}
163163

164-
#[derive(Diagnostic, Clone, Copy)]
164+
#[derive(Diagnostic)]
165165
#[diag(ast_lowering_inline_asm_unsupported_target, code = E0472)]
166166
pub struct InlineAsmUnsupportedTarget {
167167
#[primary_span]
168168
pub span: Span,
169169
}
170170

171-
#[derive(Diagnostic, Clone, Copy)]
171+
#[derive(Diagnostic)]
172172
#[diag(ast_lowering_att_syntax_only_x86)]
173173
pub struct AttSyntaxOnlyX86 {
174174
#[primary_span]
175175
pub span: Span,
176176
}
177177

178-
#[derive(Diagnostic, Clone, Copy)]
178+
#[derive(Diagnostic)]
179179
#[diag(ast_lowering_abi_specified_multiple_times)]
180180
pub struct AbiSpecifiedMultipleTimes {
181181
#[primary_span]
@@ -187,7 +187,7 @@ pub struct AbiSpecifiedMultipleTimes {
187187
pub equivalent: Option<()>,
188188
}
189189

190-
#[derive(Diagnostic, Clone, Copy)]
190+
#[derive(Diagnostic)]
191191
#[diag(ast_lowering_clobber_abi_not_supported)]
192192
pub struct ClobberAbiNotSupported {
193193
#[primary_span]
@@ -203,7 +203,7 @@ pub struct InvalidAbiClobberAbi {
203203
pub supported_abis: String,
204204
}
205205

206-
#[derive(Diagnostic, Clone, Copy)]
206+
#[derive(Diagnostic)]
207207
#[diag(ast_lowering_invalid_register)]
208208
pub struct InvalidRegister<'a> {
209209
#[primary_span]
@@ -212,7 +212,7 @@ pub struct InvalidRegister<'a> {
212212
pub error: &'a str,
213213
}
214214

215-
#[derive(Diagnostic, Clone, Copy)]
215+
#[derive(Diagnostic)]
216216
#[diag(ast_lowering_invalid_register_class)]
217217
pub struct InvalidRegisterClass<'a> {
218218
#[primary_span]
@@ -241,7 +241,7 @@ pub enum InvalidAsmTemplateModifierRegClassSub {
241241
DoesNotSupportModifier { class_name: Symbol },
242242
}
243243

244-
#[derive(Diagnostic, Clone, Copy)]
244+
#[derive(Diagnostic)]
245245
#[diag(ast_lowering_invalid_asm_template_modifier_const)]
246246
pub struct InvalidAsmTemplateModifierConst {
247247
#[primary_span]
@@ -251,7 +251,7 @@ pub struct InvalidAsmTemplateModifierConst {
251251
pub op_span: Span,
252252
}
253253

254-
#[derive(Diagnostic, Clone, Copy)]
254+
#[derive(Diagnostic)]
255255
#[diag(ast_lowering_invalid_asm_template_modifier_sym)]
256256
pub struct InvalidAsmTemplateModifierSym {
257257
#[primary_span]
@@ -261,15 +261,15 @@ pub struct InvalidAsmTemplateModifierSym {
261261
pub op_span: Span,
262262
}
263263

264-
#[derive(Diagnostic, Clone, Copy)]
264+
#[derive(Diagnostic)]
265265
#[diag(ast_lowering_register_class_only_clobber)]
266266
pub struct RegisterClassOnlyClobber {
267267
#[primary_span]
268268
pub op_span: Span,
269269
pub reg_class_name: Symbol,
270270
}
271271

272-
#[derive(Diagnostic, Clone, Copy)]
272+
#[derive(Diagnostic)]
273273
#[diag(ast_lowering_register_conflict)]
274274
pub struct RegisterConflict<'a> {
275275
#[primary_span]
@@ -283,7 +283,7 @@ pub struct RegisterConflict<'a> {
283283
pub in_out: Option<Span>,
284284
}
285285

286-
#[derive(Diagnostic, Clone, Copy)]
286+
#[derive(Diagnostic)]
287287
#[help]
288288
#[diag(ast_lowering_sub_tuple_binding)]
289289
pub struct SubTupleBinding<'a> {
@@ -301,7 +301,7 @@ pub struct SubTupleBinding<'a> {
301301
pub ctx: &'a str,
302302
}
303303

304-
#[derive(Diagnostic, Clone, Copy)]
304+
#[derive(Diagnostic)]
305305
#[diag(ast_lowering_extra_double_dot)]
306306
pub struct ExtraDoubleDot<'a> {
307307
#[primary_span]
@@ -312,15 +312,15 @@ pub struct ExtraDoubleDot<'a> {
312312
pub ctx: &'a str,
313313
}
314314

315-
#[derive(Diagnostic, Clone, Copy)]
315+
#[derive(Diagnostic)]
316316
#[note]
317317
#[diag(ast_lowering_misplaced_double_dot)]
318318
pub struct MisplacedDoubleDot {
319319
#[primary_span]
320320
pub span: Span,
321321
}
322322

323-
#[derive(Diagnostic, Clone, Copy)]
323+
#[derive(Diagnostic)]
324324
#[diag(ast_lowering_misplaced_relax_trait_bound)]
325325
pub struct MisplacedRelaxTraitBound {
326326
#[primary_span]
@@ -353,14 +353,14 @@ pub struct NeverPatternWithGuard {
353353
pub span: Span,
354354
}
355355

356-
#[derive(Diagnostic, Clone, Copy)]
356+
#[derive(Diagnostic)]
357357
#[diag(ast_lowering_arbitrary_expression_in_pattern)]
358358
pub struct ArbitraryExpressionInPattern {
359359
#[primary_span]
360360
pub span: Span,
361361
}
362362

363-
#[derive(Diagnostic, Clone, Copy)]
363+
#[derive(Diagnostic)]
364364
#[diag(ast_lowering_inclusive_range_with_no_end)]
365365
pub struct InclusiveRangeWithNoEnd {
366366
#[primary_span]

0 commit comments

Comments
 (0)