@@ -6,9 +6,9 @@ use rustc_span::{symbol::Ident, Span, Symbol};
66#[ error( code = "E0062" , slug = "typeck-field-multiply-specified-in-initializer" ) ]
77pub struct FieldMultiplySpecifiedInInitializer {
88 #[ primary_span]
9- #[ label = "used more than once" ]
9+ #[ label]
1010 pub span : Span ,
11- #[ label = "first use of `{ident}` " ]
11+ #[ label = "previous- use-label " ]
1212 pub prev_span : Span ,
1313 pub ident : Ident ,
1414}
@@ -17,7 +17,7 @@ pub struct FieldMultiplySpecifiedInInitializer {
1717#[ error( code = "E0092" , slug = "typeck-unrecognized-atomic-operation" ) ]
1818pub struct UnrecognizedAtomicOperation < ' a > {
1919 #[ primary_span]
20- #[ label = "unrecognized atomic operation" ]
20+ #[ label]
2121 pub span : Span ,
2222 pub op : & ' a str ,
2323}
@@ -26,7 +26,7 @@ pub struct UnrecognizedAtomicOperation<'a> {
2626#[ error( code = "E0094" , slug = "typeck-wrong-number-of-generic-arguments-to-intrinsic" ) ]
2727pub struct WrongNumberOfGenericArgumentsToIntrinsic < ' a > {
2828 #[ primary_span]
29- #[ label = "expected {expected} {descr} parameter{expected_pluralize}" ]
29+ #[ label]
3030 pub span : Span ,
3131 pub found : usize ,
3232 pub expected : usize ,
@@ -38,7 +38,7 @@ pub struct WrongNumberOfGenericArgumentsToIntrinsic<'a> {
3838#[ error( code = "E0093" , slug = "typeck-unrecognized-intrinsic-function" ) ]
3939pub struct UnrecognizedIntrinsicFunction {
4040 #[ primary_span]
41- #[ label = "unrecognized intrinsic" ]
41+ #[ label]
4242 pub span : Span ,
4343 pub name : Symbol ,
4444}
@@ -47,9 +47,9 @@ pub struct UnrecognizedIntrinsicFunction {
4747#[ error( code = "E0195" , slug = "typeck-lifetimes-or-bounds-mismatch-on-trait" ) ]
4848pub struct LifetimesOrBoundsMismatchOnTrait {
4949 #[ primary_span]
50- #[ label = "lifetimes do not match {item_kind} in trait" ]
50+ #[ label]
5151 pub span : Span ,
52- #[ label = "lifetimes in impl do not match this {item_kind} in trait " ]
52+ #[ label = "generics-label " ]
5353 pub generics_span : Option < Span > ,
5454 pub item_kind : & ' static str ,
5555 pub ident : Ident ,
@@ -59,7 +59,7 @@ pub struct LifetimesOrBoundsMismatchOnTrait {
5959#[ error( code = "E0120" , slug = "typeck-drop-impl-on-wrong-item" ) ]
6060pub struct DropImplOnWrongItem {
6161 #[ primary_span]
62- #[ label = "must be a struct, enum, or union" ]
62+ #[ label]
6363 pub span : Span ,
6464}
6565
@@ -68,17 +68,17 @@ pub struct DropImplOnWrongItem {
6868pub struct FieldAlreadyDeclared {
6969 pub field_name : Ident ,
7070 #[ primary_span]
71- #[ label = "field already declared" ]
71+ #[ label]
7272 pub span : Span ,
73- #[ label = "`{field_name}` first declared here " ]
73+ #[ label = "previous-decl-label " ]
7474 pub prev_span : Span ,
7575}
7676
7777#[ derive( SessionDiagnostic ) ]
7878#[ error( code = "E0184" , slug = "typeck-copy-impl-on-type-with-dtor" ) ]
7979pub struct CopyImplOnTypeWithDtor {
8080 #[ primary_span]
81- #[ label = "Copy not allowed on types with destructors" ]
81+ #[ label]
8282 pub span : Span ,
8383}
8484
@@ -93,7 +93,7 @@ pub struct MultipleRelaxedDefaultBounds {
9393#[ error( code = "E0206" , slug = "typeck-copy-impl-on-non-adt" ) ]
9494pub struct CopyImplOnNonAdt {
9595 #[ primary_span]
96- #[ label = "type is not a structure or enumeration" ]
96+ #[ label]
9797 pub span : Span ,
9898}
9999
@@ -115,7 +115,7 @@ pub struct AmbiguousLifetimeBound {
115115#[ error( code = "E0229" , slug = "typeck-assoc-type-binding-not-allowed" ) ]
116116pub struct AssocTypeBindingNotAllowed {
117117 #[ primary_span]
118- #[ label = "associated type not allowed here" ]
118+ #[ label]
119119 pub span : Span ,
120120}
121121
@@ -130,7 +130,7 @@ pub struct FunctionalRecordUpdateOnNonStruct {
130130#[ error( code = "E0516" , slug = "typeck-typeof-reserved-keyword-used" ) ]
131131pub struct TypeofReservedKeywordUsed {
132132 #[ primary_span]
133- #[ label = "reserved keyword" ]
133+ #[ label]
134134 pub span : Span ,
135135}
136136
@@ -139,9 +139,9 @@ pub struct TypeofReservedKeywordUsed {
139139pub struct ReturnStmtOutsideOfFnBody {
140140 #[ primary_span]
141141 pub span : Span ,
142- #[ label = "the return is part of this body... " ]
142+ #[ label = "encl- body-label " ]
143143 pub encl_body_span : Option < Span > ,
144- #[ label = "...not the enclosing function body " ]
144+ #[ label = "encl-fn-label " ]
145145 pub encl_fn_span : Option < Span > ,
146146}
147147
@@ -171,9 +171,9 @@ pub struct MethodCallOnUnknownType {
171171#[ error( code = "E0719" , slug = "typeck-value-of-associated-struct-already-specified" ) ]
172172pub struct ValueOfAssociatedStructAlreadySpecified {
173173 #[ primary_span]
174- #[ label = "re-bound here" ]
174+ #[ label]
175175 pub span : Span ,
176- #[ label = "`{item_name}` bound here first " ]
176+ #[ label = "previous- bound-label " ]
177177 pub prev_span : Span ,
178178 pub item_name : Ident ,
179179 pub def_path : String ,
@@ -183,6 +183,6 @@ pub struct ValueOfAssociatedStructAlreadySpecified {
183183#[ error( code = "E0745" , slug = "typeck-address-of-temporary-taken" ) ]
184184pub struct AddressOfTemporaryTaken {
185185 #[ primary_span]
186- #[ label = "temporary value" ]
186+ #[ label]
187187 pub span : Span ,
188188}
0 commit comments