@@ -64,7 +64,7 @@ pub(crate) struct BadQPathStage2 {
64
64
#[ diag( parser_incorrect_semicolon) ]
65
65
pub ( crate ) struct IncorrectSemicolon < ' a > {
66
66
#[ primary_span]
67
- #[ suggestion_short ( code = "" , applicability = "machine-applicable" ) ]
67
+ #[ suggestion ( style = "short" , code = "" , applicability = "machine-applicable" ) ]
68
68
pub span : Span ,
69
69
#[ help]
70
70
pub opt_help : Option < ( ) > ,
@@ -136,7 +136,12 @@ pub(crate) struct InvalidComparisonOperator {
136
136
137
137
#[ derive( Subdiagnostic ) ]
138
138
pub ( 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
+ ) ]
140
145
Correctable {
141
146
#[ primary_span]
142
147
span : Span ,
@@ -160,14 +165,16 @@ pub(crate) struct InvalidLogicalOperator {
160
165
161
166
#[ derive( Subdiagnostic ) ]
162
167
pub ( crate ) enum InvalidLogicalOperatorSub {
163
- #[ suggestion_short (
168
+ #[ suggestion (
164
169
use_amp_amp_for_conjunction,
170
+ style = "short" ,
165
171
applicability = "machine-applicable" ,
166
172
code = "&&"
167
173
) ]
168
174
Conjunction ( #[ primary_span] Span ) ,
169
- #[ suggestion_short (
175
+ #[ suggestion (
170
176
use_pipe_pipe_for_disjunction,
177
+ style = "short" ,
171
178
applicability = "machine-applicable" ,
172
179
code = "||"
173
180
) ]
@@ -178,7 +185,7 @@ pub(crate) enum InvalidLogicalOperatorSub {
178
185
#[ diag( parser_tilde_is_not_unary_operator) ]
179
186
pub ( crate ) struct TildeAsUnaryOperator (
180
187
#[ primary_span]
181
- #[ suggestion_short ( applicability = "machine-applicable" , code = "!" ) ]
188
+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = "!" ) ]
182
189
pub Span ,
183
190
) ;
184
191
@@ -194,22 +201,25 @@ pub(crate) struct NotAsNegationOperator {
194
201
195
202
#[ derive( Subdiagnostic ) ]
196
203
pub enum NotAsNegationOperatorSub {
197
- #[ suggestion_short (
204
+ #[ suggestion (
198
205
parser_unexpected_token_after_not_default,
206
+ style = "short" ,
199
207
applicability = "machine-applicable" ,
200
208
code = "!"
201
209
) ]
202
210
SuggestNotDefault ( #[ primary_span] Span ) ,
203
211
204
- #[ suggestion_short (
212
+ #[ suggestion (
205
213
parser_unexpected_token_after_not_bitwise,
214
+ style = "short" ,
206
215
applicability = "machine-applicable" ,
207
216
code = "!"
208
217
) ]
209
218
SuggestNotBitwise ( #[ primary_span] Span ) ,
210
219
211
- #[ suggestion_short (
220
+ #[ suggestion (
212
221
parser_unexpected_token_after_not_logical,
222
+ style = "short" ,
213
223
applicability = "machine-applicable" ,
214
224
code = "!"
215
225
) ]
@@ -249,7 +259,7 @@ pub(crate) struct UnexpectedTokenAfterLabel {
249
259
#[ primary_span]
250
260
#[ label( parser_unexpected_token_after_label) ]
251
261
pub span : Span ,
252
- #[ suggestion_verbose ( suggestion_remove_label, code = "" ) ]
262
+ #[ suggestion ( suggestion_remove_label, style = "verbose" , code = "" ) ]
253
263
pub remove_label : Option < Span > ,
254
264
#[ subdiagnostic]
255
265
pub enclose_in_block : Option < UnexpectedTokenAfterLabelSugg > ,
@@ -272,7 +282,7 @@ pub(crate) struct RequireColonAfterLabeledExpression {
272
282
pub span : Span ,
273
283
#[ label]
274
284
pub label : Span ,
275
- #[ suggestion_short ( applicability = "machine-applicable" , code = ": " ) ]
285
+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = ": " ) ]
276
286
pub label_end : Span ,
277
287
}
278
288
@@ -354,7 +364,7 @@ pub(crate) struct IntLiteralTooLarge {
354
364
pub ( crate ) struct MissingSemicolonBeforeArray {
355
365
#[ primary_span]
356
366
pub open_delim : Span ,
357
- #[ suggestion_verbose ( applicability = "maybe-incorrect" , code = ";" ) ]
367
+ #[ suggestion ( style = "verbose" , applicability = "maybe-incorrect" , code = ";" ) ]
358
368
pub semicolon : Span ,
359
369
}
360
370
@@ -442,9 +452,9 @@ pub(crate) struct MissingInInForLoop {
442
452
#[ derive( Subdiagnostic ) ]
443
453
pub ( crate ) enum MissingInInForLoopSub {
444
454
// 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" ) ]
446
456
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 " ) ]
448
458
AddIn ( #[ primary_span] Span ) ,
449
459
}
450
460
@@ -470,7 +480,7 @@ pub(crate) struct CatchAfterTry {
470
480
pub ( crate ) struct CommaAfterBaseStruct {
471
481
#[ primary_span]
472
482
pub span : Span ,
473
- #[ suggestion_short ( applicability = "machine-applicable" , code = "" ) ]
483
+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = "" ) ]
474
484
pub comma : Span ,
475
485
}
476
486
@@ -512,15 +522,15 @@ pub(crate) struct RemoveLet {
512
522
#[ diag( parser_use_eq_instead) ]
513
523
pub ( crate ) struct UseEqInstead {
514
524
#[ primary_span]
515
- #[ suggestion_short ( applicability = "machine-applicable" , code = "=" ) ]
525
+ #[ suggestion ( style = "short" , applicability = "machine-applicable" , code = "=" ) ]
516
526
pub span : Span ,
517
527
}
518
528
519
529
#[ derive( Diagnostic ) ]
520
530
#[ diag( parser_use_empty_block_not_semi) ]
521
531
pub ( crate ) struct UseEmptyBlockNotSemi {
522
532
#[ primary_span]
523
- #[ suggestion_hidden ( applicability = "machine-applicable" , code = "{{}}" ) ]
533
+ #[ suggestion ( style = "hidden" , applicability = "machine-applicable" , code = "{{}}" ) ]
524
534
pub span : Span ,
525
535
}
526
536
@@ -576,7 +586,12 @@ pub(crate) struct LeadingPlusNotSupported {
576
586
#[ primary_span]
577
587
#[ label]
578
588
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
+ ) ]
580
595
pub remove_plus : Option < Span > ,
581
596
#[ subdiagnostic]
582
597
pub add_parentheses : Option < ExprParenthesesNeeded > ,
@@ -843,7 +858,7 @@ pub(crate) struct InvalidCurlyInLetElse {
843
858
#[ help]
844
859
pub ( crate ) struct CompoundAssignmentExpressionInLet {
845
860
#[ primary_span]
846
- #[ suggestion_short ( code = "=" , applicability = "maybe-incorrect" ) ]
861
+ #[ suggestion ( style = "short" , code = "=" , applicability = "maybe-incorrect" ) ]
847
862
pub span : Span ,
848
863
}
849
864
@@ -864,8 +879,9 @@ pub(crate) struct InvalidMetaItem {
864
879
}
865
880
866
881
#[ derive( Subdiagnostic ) ]
867
- #[ suggestion_verbose (
882
+ #[ suggestion (
868
883
parser_sugg_escape_to_use_as_identifier,
884
+ style = "verbose" ,
869
885
applicability = "maybe-incorrect" ,
870
886
code = "r#"
871
887
) ]
@@ -1003,7 +1019,12 @@ pub(crate) enum ExpectedSemiSugg {
1003
1019
applicability = "machine-applicable"
1004
1020
) ]
1005
1021
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
+ ) ]
1007
1028
AddSemi ( #[ primary_span] Span ) ,
1008
1029
}
1009
1030
@@ -1057,8 +1078,9 @@ pub(crate) struct GenericParamsWithoutAngleBracketsSugg {
1057
1078
pub ( crate ) struct ComparisonOperatorsCannotBeChained {
1058
1079
#[ primary_span]
1059
1080
pub span : Vec < Span > ,
1060
- #[ suggestion_verbose (
1081
+ #[ suggestion (
1061
1082
parser_sugg_turbofish_syntax,
1083
+ style = "verbose" ,
1062
1084
code = "::" ,
1063
1085
applicability = "maybe-incorrect"
1064
1086
) ]
@@ -1072,8 +1094,9 @@ pub(crate) struct ComparisonOperatorsCannotBeChained {
1072
1094
1073
1095
#[ derive( Subdiagnostic ) ]
1074
1096
pub ( crate ) enum ComparisonOperatorsCannotBeChainedSugg {
1075
- #[ suggestion_verbose (
1097
+ #[ suggestion (
1076
1098
sugg_split_comparison,
1099
+ style = "verbose" ,
1077
1100
code = " && {middle_term}" ,
1078
1101
applicability = "maybe-incorrect"
1079
1102
) ]
@@ -1215,15 +1238,15 @@ pub(crate) enum UnexpectedConstParamDeclarationSugg {
1215
1238
pub ( crate ) struct UnexpectedConstInGenericParam {
1216
1239
#[ primary_span]
1217
1240
pub span : Span ,
1218
- #[ suggestion_verbose ( code = "" , applicability = "maybe-incorrect" ) ]
1241
+ #[ suggestion ( style = "verbose" , code = "" , applicability = "maybe-incorrect" ) ]
1219
1242
pub to_remove : Option < Span > ,
1220
1243
}
1221
1244
1222
1245
#[ derive( Diagnostic ) ]
1223
1246
#[ diag( parser_async_move_order_incorrect) ]
1224
1247
pub ( crate ) struct AsyncMoveOrderIncorrect {
1225
1248
#[ primary_span]
1226
- #[ suggestion_verbose ( code = "async move" , applicability = "maybe-incorrect" ) ]
1249
+ #[ suggestion ( style = "verbose" , code = "async move" , applicability = "maybe-incorrect" ) ]
1227
1250
pub span : Span ,
1228
1251
}
1229
1252
0 commit comments