@@ -65,16 +65,16 @@ LL | #[label()]
65
65
| ^^^^^^^^^^
66
66
67
67
error: `code` is not a valid nested attribute of a `label` attribute
68
- --> $DIR/subdiagnostic-derive.rs:137:28
68
+ --> $DIR/subdiagnostic-derive.rs:137:1
69
69
|
70
70
LL | #[label(parser::add_paren, code = "...")]
71
- | ^^^^^^^^^^^^
71
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^
72
72
73
73
error: `applicability` is not a valid nested attribute of a `label` attribute
74
- --> $DIR/subdiagnostic-derive.rs:146:28
74
+ --> $DIR/subdiagnostic-derive.rs:146:1
75
75
|
76
76
LL | #[label(parser::add_paren, applicability = "machine-applicable")]
77
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
78
78
79
79
error: unsupported type attribute for subdiagnostic enum
80
80
--> $DIR/subdiagnostic-derive.rs:155:1
@@ -100,11 +100,13 @@ error: `#[bar = ...]` is not a valid attribute
100
100
LL | #[bar = 4]
101
101
| ^^^^^^^^^^
102
102
103
- error: `#[bar(...)]` is not a valid attribute
104
- --> $DIR/subdiagnostic-derive.rs:205:5
103
+ error: `#[bar(" ..." )]` is not a valid attribute
104
+ --> $DIR/subdiagnostic-derive.rs:205:11
105
105
|
106
106
LL | #[bar("...")]
107
- | ^^^^^^^^^^^^^
107
+ | ^^^^^
108
+ |
109
+ = help: first argument of the attribute should be the diagnostic slug
108
110
109
111
error: diagnostic slug must be first argument of a `#[label(...)]` attribute
110
112
--> $DIR/subdiagnostic-derive.rs:217:5
@@ -161,8 +163,6 @@ error: `#[bar(...)]` is not a valid attribute
161
163
|
162
164
LL | #[bar("...")]
163
165
| ^^^^^^^^^^^^^
164
- |
165
- = help: only `primary_span`, `applicability` and `skip_arg` are valid field attributes
166
166
167
167
error: unexpected unsupported untagged union
168
168
--> $DIR/subdiagnostic-derive.rs:304:1
@@ -174,246 +174,142 @@ LL | | b: u64
174
174
LL | | }
175
175
| |_^
176
176
177
- error: specified multiple times
178
- --> $DIR/subdiagnostic-derive.rs:313:1
179
- |
180
- LL | #[label(parser::add_paren)]
181
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
182
- |
183
- note: previously specified here
184
- --> $DIR/subdiagnostic-derive.rs:311:1
185
- |
186
- LL | #[label(parser::add_paren)]
187
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
188
-
189
177
error: `#[label(parser::add_paren)]` is not a valid attribute
190
- --> $DIR/subdiagnostic-derive.rs:321 :28
178
+ --> $DIR/subdiagnostic-derive.rs:311 :28
191
179
|
192
180
LL | #[label(parser::add_paren, parser::add_paren)]
193
181
| ^^^^^^^^^^^^^^^^^
194
182
|
195
183
= help: a diagnostic slug must be the first argument to the attribute
196
184
197
185
error: specified multiple times
198
- --> $DIR/subdiagnostic-derive.rs:334 :5
186
+ --> $DIR/subdiagnostic-derive.rs:324 :5
199
187
|
200
188
LL | #[primary_span]
201
189
| ^^^^^^^^^^^^^^^
202
190
|
203
191
note: previously specified here
204
- --> $DIR/subdiagnostic-derive.rs:331 :5
192
+ --> $DIR/subdiagnostic-derive.rs:321 :5
205
193
|
206
194
LL | #[primary_span]
207
195
| ^^^^^^^^^^^^^^^
208
196
209
197
error: subdiagnostic kind not specified
210
- --> $DIR/subdiagnostic-derive.rs:340 :8
198
+ --> $DIR/subdiagnostic-derive.rs:330 :8
211
199
|
212
200
LL | struct AG {
213
201
| ^^
214
202
215
203
error: specified multiple times
216
- --> $DIR/subdiagnostic-derive.rs:377 :47
204
+ --> $DIR/subdiagnostic-derive.rs:367 :47
217
205
|
218
206
LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
219
207
| ^^^^^^^^^^^^
220
208
|
221
209
note: previously specified here
222
- --> $DIR/subdiagnostic-derive.rs:377 :33
210
+ --> $DIR/subdiagnostic-derive.rs:367 :33
223
211
|
224
212
LL | #[suggestion(parser::add_paren, code = "...", code = "...")]
225
213
| ^^^^^^^^^^^^
226
214
227
215
error: specified multiple times
228
- --> $DIR/subdiagnostic-derive.rs:395 :5
216
+ --> $DIR/subdiagnostic-derive.rs:385 :5
229
217
|
230
218
LL | #[applicability]
231
219
| ^^^^^^^^^^^^^^^^
232
220
|
233
221
note: previously specified here
234
- --> $DIR/subdiagnostic-derive.rs:392 :5
222
+ --> $DIR/subdiagnostic-derive.rs:382 :5
235
223
|
236
224
LL | #[applicability]
237
225
| ^^^^^^^^^^^^^^^^
238
226
239
227
error: the `#[applicability]` attribute can only be applied to fields of type `Applicability`
240
- --> $DIR/subdiagnostic-derive.rs:405 :5
228
+ --> $DIR/subdiagnostic-derive.rs:396 :5
241
229
|
242
230
LL | #[applicability]
243
231
| ^^^^^^^^^^^^^^^^
244
232
245
- error: suggestion without `code = "..."`
246
- --> $DIR/subdiagnostic-derive.rs:418:1
247
- |
248
- LL | #[suggestion(parser::add_paren)]
249
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
250
-
251
- error: invalid applicability
252
- --> $DIR/subdiagnostic-derive.rs:428:46
253
- |
254
- LL | #[suggestion(parser::add_paren, code ="...", applicability = "foo")]
255
- | ^^^^^^^^^^^^^^^^^^^^^
256
-
257
- error: suggestion without `#[primary_span]` field
258
- --> $DIR/subdiagnostic-derive.rs:446:1
233
+ error: suggestion without `applicability`
234
+ --> $DIR/subdiagnostic-derive.rs:391:1
259
235
|
260
236
LL | / #[suggestion(parser::add_paren, code = "...")]
261
237
LL | |
262
- LL | | struct AR {
263
- LL | | var: String,
238
+ LL | | struct AL {
239
+ LL | | #[primary_span]
240
+ ... |
241
+ LL | | applicability: Span,
264
242
LL | | }
265
243
| |_^
266
244
267
- error: unsupported type attribute for subdiagnostic enum
268
- --> $DIR/subdiagnostic-derive.rs:460:1
269
- |
270
- LL | #[label]
271
- | ^^^^^^^^
272
-
273
- error: `var` doesn't refer to a field on this type
274
- --> $DIR/subdiagnostic-derive.rs:480:39
275
- |
276
- LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
277
- | ^^^^^^^
278
-
279
- error: `var` doesn't refer to a field on this type
280
- --> $DIR/subdiagnostic-derive.rs:499:43
281
- |
282
- LL | #[suggestion(parser::add_paren, code ="{var}", applicability = "machine-applicable")]
283
- | ^^^^^^^
284
-
285
- error: `#[suggestion_part]` is not a valid attribute
286
- --> $DIR/subdiagnostic-derive.rs:522:5
287
- |
288
- LL | #[suggestion_part]
289
- | ^^^^^^^^^^^^^^^^^^
290
- |
291
- = help: `#[suggestion_part(...)]` is only valid in multipart suggestions, use `#[primary_span]` instead
292
-
293
- error: `#[suggestion_part(...)]` is not a valid attribute
294
- --> $DIR/subdiagnostic-derive.rs:525:5
245
+ error: suggestion without `applicability`
246
+ --> $DIR/subdiagnostic-derive.rs:402:1
295
247
|
296
- LL | #[suggestion_part(code = "...")]
297
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298
- |
299
- = help: `#[suggestion_part(...)]` is only valid in multipart suggestions
248
+ LL | / #[suggestion(parser::add_paren, code = "...")]
249
+ LL | |
250
+ LL | | struct AM {
251
+ LL | | #[primary_span]
252
+ LL | | span: Span,
253
+ LL | | }
254
+ | |_^
300
255
301
- error: suggestion without `#[primary_span]` field
302
- --> $DIR/subdiagnostic-derive.rs:519 :1
256
+ error: suggestion without `code = "..."`
257
+ --> $DIR/subdiagnostic-derive.rs:410 :1
303
258
|
304
- LL | / #[suggestion(parser::add_paren, code = "..." )]
259
+ LL | / #[suggestion(parser::add_paren)]
305
260
LL | |
306
- LL | | struct BA {
307
- LL | | #[suggestion_part ]
261
+ LL | | struct AN {
262
+ LL | | #[primary_span ]
308
263
... |
309
- LL | | var: String ,
264
+ LL | | applicability: Applicability ,
310
265
LL | | }
311
266
| |_^
312
267
313
- error: `code` is not a valid nested attribute of a `multipart_suggestion` attribute
314
- --> $DIR/subdiagnostic-derive.rs:534:43
268
+ error: invalid applicability
269
+ --> $DIR/subdiagnostic-derive.rs:420:46
315
270
|
316
- LL | #[multipart_suggestion (parser::add_paren, code = "...", applicability = "machine-applicable ")]
317
- | ^^^^^^^^^^^^
271
+ LL | #[suggestion (parser::add_paren, code ="...", applicability = "foo ")]
272
+ | ^^^^^^^^^ ^^^^^^^^^^^^
318
273
319
- error: multipart suggestion without any `#[suggestion_part(...)]` fields
320
- --> $DIR/subdiagnostic-derive.rs:534 :1
274
+ error: suggestion without `applicability`
275
+ --> $DIR/subdiagnostic-derive.rs:438 :1
321
276
|
322
- LL | / #[multipart_suggestion (parser::add_paren, code = "...", applicability = "machine-applicable ")]
277
+ LL | / #[suggestion (parser::add_paren, code = "...")]
323
278
LL | |
324
279
LL | |
325
- LL | | struct BBa {
280
+ LL | | struct AR {
326
281
LL | | var: String,
327
282
LL | | }
328
283
| |_^
329
284
330
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
331
- --> $DIR/subdiagnostic-derive.rs:544:5
332
- |
333
- LL | #[suggestion_part]
334
- | ^^^^^^^^^^^^^^^^^^
335
-
336
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
337
- --> $DIR/subdiagnostic-derive.rs:552:5
338
- |
339
- LL | #[suggestion_part()]
340
- | ^^^^^^^^^^^^^^^^^^^^
341
-
342
- error: `#[primary_span]` is not a valid attribute
343
- --> $DIR/subdiagnostic-derive.rs:561:5
344
- |
345
- LL | #[primary_span]
346
- | ^^^^^^^^^^^^^^^
347
- |
348
- = help: multipart suggestions use one or more `#[suggestion_part]`s rather than one `#[primary_span]`
349
-
350
- error: multipart suggestion without any `#[suggestion_part(...)]` fields
351
- --> $DIR/subdiagnostic-derive.rs:558:1
285
+ error: suggestion without `#[primary_span]` field
286
+ --> $DIR/subdiagnostic-derive.rs:438:1
352
287
|
353
- LL | / #[multipart_suggestion (parser::add_paren)]
288
+ LL | / #[suggestion (parser::add_paren, code = "..." )]
354
289
LL | |
355
- LL | | struct BC {
356
- LL | | #[primary_span]
357
290
LL | |
358
- LL | | span: Span,
291
+ LL | | struct AR {
292
+ LL | | var: String,
359
293
LL | | }
360
294
| |_^
361
295
362
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
363
- --> $DIR/subdiagnostic-derive.rs:569:5
364
- |
365
- LL | #[suggestion_part]
366
- | ^^^^^^^^^^^^^^^^^^
367
-
368
- error: `#[suggestion_part(...)]` attribute without `code = "..."`
369
- --> $DIR/subdiagnostic-derive.rs:572:5
370
- |
371
- LL | #[suggestion_part()]
372
- | ^^^^^^^^^^^^^^^^^^^^
373
-
374
- error: `#[suggestion_part(foo = ...)]` is not a valid attribute
375
- --> $DIR/subdiagnostic-derive.rs:575:23
376
- |
377
- LL | #[suggestion_part(foo = "bar")]
378
- | ^^^^^^^^^^^
379
- |
380
- = help: `code` is the only valid nested attribute
381
-
382
- error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
383
- --> $DIR/subdiagnostic-derive.rs:578:5
384
- |
385
- LL | #[suggestion_part(code = "...")]
386
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
387
-
388
- error: the `#[suggestion_part(...)]` attribute can only be applied to fields of type `Span` or `MultiSpan`
389
- --> $DIR/subdiagnostic-derive.rs:581:5
296
+ error: unsupported type attribute for subdiagnostic enum
297
+ --> $DIR/subdiagnostic-derive.rs:453:1
390
298
|
391
- LL | #[suggestion_part() ]
392
- | ^^^^^^^^^^^^ ^^^^^^^^
299
+ LL | #[label ]
300
+ | ^^^^^^^^
393
301
394
- error: specified multiple times
395
- --> $DIR/subdiagnostic-derive.rs:589:37
396
- |
397
- LL | #[suggestion_part(code = "...", code = ",,,")]
398
- | ^^^^^^^^^^^^
399
- |
400
- note: previously specified here
401
- --> $DIR/subdiagnostic-derive.rs:589:23
302
+ error: `var` doesn't refer to a field on this type
303
+ --> $DIR/subdiagnostic-derive.rs:473:39
402
304
|
403
- LL | #[suggestion_part( code = "... ", code = ",,, ")]
404
- | ^^^^^ ^^^^^^^
305
+ LL | #[suggestion(parser::add_paren, code ="{var} ", applicability = "machine-applicable ")]
306
+ | ^^^^^^^
405
307
406
- error: specified multiple times
407
- --> $DIR/subdiagnostic-derive.rs:619:5
408
- |
409
- LL | #[applicability]
410
- | ^^^^^^^^^^^^^^^^
411
- |
412
- note: previously specified here
413
- --> $DIR/subdiagnostic-derive.rs:616:43
308
+ error: `var` doesn't refer to a field on this type
309
+ --> $DIR/subdiagnostic-derive.rs:492:43
414
310
|
415
- LL | #[multipart_suggestion (parser::add_paren, applicability = "machine-applicable")]
416
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
311
+ LL | #[suggestion (parser::add_paren, code ="{var}" , applicability = "machine-applicable")]
312
+ | ^^^^^^^
417
313
418
314
error: cannot find attribute `foo` in this scope
419
315
--> $DIR/subdiagnostic-derive.rs:63:3
@@ -475,6 +371,6 @@ error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
475
371
LL | #[label(slug)]
476
372
| ^^^^ not found in `rustc_errors::fluent`
477
373
478
- error: aborting due to 64 previous errors
374
+ error: aborting due to 50 previous errors
479
375
480
376
For more information about this error, try `rustc --explain E0425`.
0 commit comments