@@ -64,7 +64,7 @@ pub(crate) struct BadQPathStage2 {
6464#[ diag( parser_incorrect_semicolon) ]
6565pub ( crate ) struct IncorrectSemicolon < ' a > {
6666 #[ primary_span]
67- #[ suggestion_short ( code = "" , applicability = "machine-applicable" ) ]
67+ #[ suggestion ( style = "short" , code = "" , applicability = "machine-applicable" ) ]
6868 pub span : Span ,
6969 #[ help]
7070 pub opt_help : Option < ( ) > ,
@@ -136,7 +136,12 @@ pub(crate) struct InvalidComparisonOperator {
136136
137137#[ derive( Subdiagnostic ) ]
138138pub ( crate ) enum InvalidComparisonOperatorSub {
139- #[ suggestion_short( use_instead, applicability = "machine-applicable" , code = "{correct}" ) ]
139+ #[ suggestion(
140+ use_instead,
141+ style = "short" ,
142+ applicability = "machine-applicable" ,
143+ code = "{correct}"
144+ ) ]
140145 Correctable {
141146 #[ primary_span]
142147 span : Span ,
@@ -160,14 +165,16 @@ pub(crate) struct InvalidLogicalOperator {
160165
161166#[ derive( Subdiagnostic ) ]
162167pub ( crate ) enum InvalidLogicalOperatorSub {
163- #[ suggestion_short (
168+ #[ suggestion (
164169 use_amp_amp_for_conjunction,
170+ style = "short" ,
165171 applicability = "machine-applicable" ,
166172 code = "&&"
167173 ) ]
168174 Conjunction ( #[ primary_span] Span ) ,
169- #[ suggestion_short (
175+ #[ suggestion (
170176 use_pipe_pipe_for_disjunction,
177+ style = "short" ,
171178 applicability = "machine-applicable" ,
172179 code = "||"
173180 ) ]
@@ -178,7 +185,7 @@ pub(crate) enum InvalidLogicalOperatorSub {
178185#[ diag( parser_tilde_is_not_unary_operator) ]
179186pub ( crate ) struct TildeAsUnaryOperator (
180187 #[ primary_span]
181- #[ suggestion_short ( applicability = "machine-applicable" , code = "!" ) ]
188+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = "!" ) ]
182189 pub Span ,
183190) ;
184191
@@ -194,22 +201,25 @@ pub(crate) struct NotAsNegationOperator {
194201
195202#[ derive( Subdiagnostic ) ]
196203pub enum NotAsNegationOperatorSub {
197- #[ suggestion_short (
204+ #[ suggestion (
198205 parser_unexpected_token_after_not_default,
206+ style = "short" ,
199207 applicability = "machine-applicable" ,
200208 code = "!"
201209 ) ]
202210 SuggestNotDefault ( #[ primary_span] Span ) ,
203211
204- #[ suggestion_short (
212+ #[ suggestion (
205213 parser_unexpected_token_after_not_bitwise,
214+ style = "short" ,
206215 applicability = "machine-applicable" ,
207216 code = "!"
208217 ) ]
209218 SuggestNotBitwise ( #[ primary_span] Span ) ,
210219
211- #[ suggestion_short (
220+ #[ suggestion (
212221 parser_unexpected_token_after_not_logical,
222+ style = "short" ,
213223 applicability = "machine-applicable" ,
214224 code = "!"
215225 ) ]
@@ -249,7 +259,7 @@ pub(crate) struct UnexpectedTokenAfterLabel {
249259 #[ primary_span]
250260 #[ label( parser_unexpected_token_after_label) ]
251261 pub span : Span ,
252- #[ suggestion_verbose ( suggestion_remove_label, code = "" ) ]
262+ #[ suggestion ( suggestion_remove_label, style = "verbose" , code = "" ) ]
253263 pub remove_label : Option < Span > ,
254264 #[ subdiagnostic]
255265 pub enclose_in_block : Option < UnexpectedTokenAfterLabelSugg > ,
@@ -272,7 +282,7 @@ pub(crate) struct RequireColonAfterLabeledExpression {
272282 pub span : Span ,
273283 #[ label]
274284 pub label : Span ,
275- #[ suggestion_short ( applicability = "machine-applicable" , code = ": " ) ]
285+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = ": " ) ]
276286 pub label_end : Span ,
277287}
278288
@@ -354,7 +364,7 @@ pub(crate) struct IntLiteralTooLarge {
354364pub ( crate ) struct MissingSemicolonBeforeArray {
355365 #[ primary_span]
356366 pub open_delim : Span ,
357- #[ suggestion_verbose ( applicability = "maybe-incorrect" , code = ";" ) ]
367+ #[ suggestion ( style = "verbose" , applicability = "maybe-incorrect" , code = ";" ) ]
358368 pub semicolon : Span ,
359369}
360370
@@ -442,9 +452,9 @@ pub(crate) struct MissingInInForLoop {
442452#[ derive( Subdiagnostic ) ]
443453pub ( crate ) enum MissingInInForLoopSub {
444454 // Has been misleading, at least in the past (closed Issue #48492), thus maybe-incorrect
445- #[ suggestion_short ( use_in_not_of, applicability = "maybe-incorrect" , code = "in" ) ]
455+ #[ suggestion ( use_in_not_of, style = "short" , applicability = "maybe-incorrect" , code = "in" ) ]
446456 InNotOf ( #[ primary_span] Span ) ,
447- #[ suggestion_short ( add_in, applicability = "maybe-incorrect" , code = " in " ) ]
457+ #[ suggestion ( add_in, style = "short" , applicability = "maybe-incorrect" , code = " in " ) ]
448458 AddIn ( #[ primary_span] Span ) ,
449459}
450460
@@ -470,7 +480,7 @@ pub(crate) struct CatchAfterTry {
470480pub ( crate ) struct CommaAfterBaseStruct {
471481 #[ primary_span]
472482 pub span : Span ,
473- #[ suggestion_short ( applicability = "machine-applicable" , code = "" ) ]
483+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = "" ) ]
474484 pub comma : Span ,
475485}
476486
@@ -512,15 +522,15 @@ pub(crate) struct RemoveLet {
512522#[ diag( parser_use_eq_instead) ]
513523pub ( crate ) struct UseEqInstead {
514524 #[ primary_span]
515- #[ suggestion_short ( applicability = "machine-applicable" , code = "=" ) ]
525+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = "=" ) ]
516526 pub span : Span ,
517527}
518528
519529#[ derive( Diagnostic ) ]
520530#[ diag( parser_use_empty_block_not_semi) ]
521531pub ( crate ) struct UseEmptyBlockNotSemi {
522532 #[ primary_span]
523- #[ suggestion_hidden ( applicability = "machine-applicable" , code = "{{}}" ) ]
533+ #[ suggestion ( style = "hidden" , applicability = "machine-applicable" , code = "{{}}" ) ]
524534 pub span : Span ,
525535}
526536
@@ -576,7 +586,12 @@ pub(crate) struct LeadingPlusNotSupported {
576586 #[ primary_span]
577587 #[ label]
578588 pub span : Span ,
579- #[ suggestion_verbose( suggestion_remove_plus, code = "" , applicability = "machine-applicable" ) ]
589+ #[ suggestion(
590+ suggestion_remove_plus,
591+ style = "verbose" ,
592+ code = "" ,
593+ applicability = "machine-applicable"
594+ ) ]
580595 pub remove_plus : Option < Span > ,
581596 #[ subdiagnostic]
582597 pub add_parentheses : Option < ExprParenthesesNeeded > ,
@@ -843,7 +858,7 @@ pub(crate) struct InvalidCurlyInLetElse {
843858#[ help]
844859pub ( crate ) struct CompoundAssignmentExpressionInLet {
845860 #[ primary_span]
846- #[ suggestion_short ( code = "=" , applicability = "maybe-incorrect" ) ]
861+ #[ suggestion ( style = "short" , code = "=" , applicability = "maybe-incorrect" ) ]
847862 pub span : Span ,
848863}
849864
@@ -864,8 +879,9 @@ pub(crate) struct InvalidMetaItem {
864879}
865880
866881#[ derive( Subdiagnostic ) ]
867- #[ suggestion_verbose (
882+ #[ suggestion (
868883 parser_sugg_escape_to_use_as_identifier,
884+ style = "verbose" ,
869885 applicability = "maybe-incorrect" ,
870886 code = "r#"
871887) ]
@@ -1003,7 +1019,12 @@ pub(crate) enum ExpectedSemiSugg {
10031019 applicability = "machine-applicable"
10041020 ) ]
10051021 ChangeToSemi ( #[ primary_span] Span ) ,
1006- #[ suggestion_short( parser_sugg_add_semi, code = ";" , applicability = "machine-applicable" ) ]
1022+ #[ suggestion(
1023+ parser_sugg_add_semi,
1024+ style = "short" ,
1025+ code = ";" ,
1026+ applicability = "machine-applicable"
1027+ ) ]
10071028 AddSemi ( #[ primary_span] Span ) ,
10081029}
10091030
@@ -1057,8 +1078,9 @@ pub(crate) struct GenericParamsWithoutAngleBracketsSugg {
10571078pub ( crate ) struct ComparisonOperatorsCannotBeChained {
10581079 #[ primary_span]
10591080 pub span : Vec < Span > ,
1060- #[ suggestion_verbose (
1081+ #[ suggestion (
10611082 parser_sugg_turbofish_syntax,
1083+ style = "verbose" ,
10621084 code = "::" ,
10631085 applicability = "maybe-incorrect"
10641086 ) ]
@@ -1072,8 +1094,9 @@ pub(crate) struct ComparisonOperatorsCannotBeChained {
10721094
10731095#[ derive( Subdiagnostic ) ]
10741096pub ( crate ) enum ComparisonOperatorsCannotBeChainedSugg {
1075- #[ suggestion_verbose (
1097+ #[ suggestion (
10761098 sugg_split_comparison,
1099+ style = "verbose" ,
10771100 code = " && {middle_term}" ,
10781101 applicability = "maybe-incorrect"
10791102 ) ]
@@ -1215,15 +1238,15 @@ pub(crate) enum UnexpectedConstParamDeclarationSugg {
12151238pub ( crate ) struct UnexpectedConstInGenericParam {
12161239 #[ primary_span]
12171240 pub span : Span ,
1218- #[ suggestion_verbose ( code = "" , applicability = "maybe-incorrect" ) ]
1241+ #[ suggestion ( style = "verbose" , code = "" , applicability = "maybe-incorrect" ) ]
12191242 pub to_remove : Option < Span > ,
12201243}
12211244
12221245#[ derive( Diagnostic ) ]
12231246#[ diag( parser_async_move_order_incorrect) ]
12241247pub ( crate ) struct AsyncMoveOrderIncorrect {
12251248 #[ primary_span]
1226- #[ suggestion_verbose ( code = "async move" , applicability = "maybe-incorrect" ) ]
1249+ #[ suggestion ( style = "verbose" , code = "async move" , applicability = "maybe-incorrect" ) ]
12271250 pub span : Span ,
12281251}
12291252
0 commit comments