@@ -29,25 +29,25 @@ fn handle_errors(sess: &ParseSess, span: Span, error: AttrError) {
2929 let diag = & sess. span_diagnostic ;
3030 match error {
3131 AttrError :: MultipleItem ( item) => {
32- struct_span_err ! ( diag, span, E0538 , "multiple '{}' items" , item) . emit ( ) ;
32+ struct_span_err ! ( diag, span, " E0538" , "multiple '{}' items" , item) . emit ( ) ;
3333 }
3434 AttrError :: UnknownMetaItem ( item, expected) => {
3535 let expected = expected. iter ( ) . map ( |name| format ! ( "`{}`" , name) ) . collect :: < Vec < _ > > ( ) ;
36- struct_span_err ! ( diag, span, E0541 , "unknown meta item '{}'" , item)
36+ struct_span_err ! ( diag, span, " E0541" , "unknown meta item '{}'" , item)
3737 . span_label ( span, format ! ( "expected one of {}" , expected. join( ", " ) ) )
3838 . emit ( ) ;
3939 }
4040 AttrError :: MissingSince => {
41- struct_span_err ! ( diag, span, E0542 , "missing 'since'" ) . emit ( ) ;
41+ struct_span_err ! ( diag, span, " E0542" , "missing 'since'" ) . emit ( ) ;
4242 }
4343 AttrError :: MissingFeature => {
44- struct_span_err ! ( diag, span, E0546 , "missing 'feature'" ) . emit ( ) ;
44+ struct_span_err ! ( diag, span, " E0546" , "missing 'feature'" ) . emit ( ) ;
4545 }
4646 AttrError :: MultipleStabilityLevels => {
47- struct_span_err ! ( diag, span, E0544 , "multiple stability levels" ) . emit ( ) ;
47+ struct_span_err ! ( diag, span, " E0544" , "multiple stability levels" ) . emit ( ) ;
4848 }
4949 AttrError :: UnsupportedLiteral ( msg, is_bytestr) => {
50- let mut err = struct_span_err ! ( diag, span, E0565 , "{}" , msg) ;
50+ let mut err = struct_span_err ! ( diag, span, " E0565" , "{}" , msg) ;
5151 if is_bytestr {
5252 if let Ok ( lint_str) = sess. source_map ( ) . span_to_snippet ( span) {
5353 err. span_suggestion (
@@ -99,7 +99,8 @@ pub fn find_unwind_attr(diagnostic: Option<&Handler>, attrs: &[Attribute]) -> Op
9999 }
100100
101101 diagnostic. map ( |d| {
102- struct_span_err ! ( d, attr. span, E0633 , "malformed `unwind` attribute input" )
102+ struct_span_err ! ( d, attr. span, "E0633" ,
103+ "malformed `unwind` attribute input" )
103104 . span_label ( attr. span , "invalid argument" )
104105 . span_suggestions (
105106 attr. span ,
@@ -286,7 +287,7 @@ where
286287 * item = Some ( v) ;
287288 true
288289 } else {
289- struct_span_err ! ( diagnostic, meta. span, E0539 , "incorrect meta item" ) . emit ( ) ;
290+ struct_span_err ! ( diagnostic, meta. span, " E0539" , "incorrect meta item" ) . emit ( ) ;
290291 false
291292 }
292293 } ;
@@ -337,7 +338,7 @@ where
337338 struct_span_err ! (
338339 diagnostic,
339340 item_sp,
340- E0540 ,
341+ " E0540" ,
341342 "multiple rustc_deprecated attributes"
342343 )
343344 . emit ( ) ;
@@ -355,7 +356,7 @@ where
355356 continue ;
356357 }
357358 _ => {
358- struct_span_err ! ( diagnostic, attr. span, E0543 , "missing 'reason'" )
359+ struct_span_err ! ( diagnostic, attr. span, " E0543" , "missing 'reason'" )
359360 . emit ( ) ;
360361 continue ;
361362 }
@@ -477,7 +478,7 @@ where
477478 continue ;
478479 }
479480 _ => {
480- struct_span_err ! ( diagnostic, attr. span, E0547 , "missing 'issue'" )
481+ struct_span_err ! ( diagnostic, attr. span, " E0547" , "missing 'issue'" )
481482 . emit ( ) ;
482483 continue ;
483484 }
@@ -567,7 +568,7 @@ where
567568 struct_span_err ! (
568569 diagnostic,
569570 item_sp,
570- E0549 ,
571+ " E0549" ,
571572 "rustc_deprecated attribute must be paired with \
572573 either stable or unstable attribute"
573574 )
@@ -584,7 +585,7 @@ where
584585 struct_span_err ! (
585586 diagnostic,
586587 item_sp,
587- E0717 ,
588+ " E0717" ,
588589 "rustc_promotable and rustc_allow_const_fn_ptr attributes \
589590 must be paired with either a rustc_const_unstable or a rustc_const_stable \
590591 attribute"
@@ -679,7 +680,7 @@ pub fn eval_condition(
679680 struct_span_err ! (
680681 sess. span_diagnostic,
681682 cfg. span,
682- E0536 ,
683+ " E0536" ,
683684 "expected 1 cfg-pattern"
684685 )
685686 . emit ( ) ;
@@ -692,7 +693,7 @@ pub fn eval_condition(
692693 struct_span_err ! (
693694 sess. span_diagnostic,
694695 cfg. span,
695- E0537 ,
696+ " E0537" ,
696697 "invalid predicate `{}`" ,
697698 pprust:: path_to_string( & cfg. path)
698699 )
@@ -737,7 +738,7 @@ where
737738 }
738739
739740 if depr. is_some ( ) {
740- struct_span_err ! ( diagnostic, item_sp, E0550 , "multiple deprecated attributes" ) . emit ( ) ;
741+ struct_span_err ! ( diagnostic, item_sp, " E0550" , "multiple deprecated attributes" ) . emit ( ) ;
741742 break ;
742743 }
743744
@@ -775,7 +776,7 @@ where
775776 ) ,
776777 ) ;
777778 } else {
778- struct_span_err ! ( diagnostic, meta. span, E0551 , "incorrect meta item" )
779+ struct_span_err ! ( diagnostic, meta. span, " E0551" , "incorrect meta item" )
779780 . emit ( ) ;
780781 }
781782
@@ -940,7 +941,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec<ReprAttr> {
940941 struct_span_err ! (
941942 diagnostic,
942943 item. span( ) ,
943- E0589 ,
944+ " E0589" ,
944945 "invalid `repr(align)` attribute: {}" ,
945946 literal_error
946947 )
@@ -954,7 +955,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec<ReprAttr> {
954955 let mut err = struct_span_err ! (
955956 diagnostic,
956957 item. span( ) ,
957- E0693 ,
958+ " E0693" ,
958959 "incorrect `repr(align)` attribute format"
959960 ) ;
960961 match value. kind {
@@ -986,7 +987,7 @@ pub fn find_repr_attrs(sess: &ParseSess, attr: &Attribute) -> Vec<ReprAttr> {
986987 struct_span_err ! (
987988 diagnostic,
988989 item. span( ) ,
989- E0552 ,
990+ " E0552" ,
990991 "unrecognized representation hint"
991992 )
992993 . emit ( ) ;
0 commit comments