@@ -322,208 +322,200 @@ error: only `no_span` is a valid nested attribute
322
322
LL | #[label(no_crate_label, foo("..."))]
323
323
| ^^^
324
324
325
- error: `#[primary_span]` is not a valid attribute
326
- --> $DIR/diagnostic-derive.rs:563:5
327
- |
328
- LL | #[primary_span]
329
- | ^
330
- |
331
- = help: the `primary_span` field attribute is not valid for lint diagnostics
332
-
333
325
error: `#[error(...)]` is not a valid attribute
334
- --> $DIR/diagnostic-derive.rs:583 :1
326
+ --> $DIR/diagnostic-derive.rs:582 :1
335
327
|
336
328
LL | #[error(no_crate_example, code = E0123)]
337
329
| ^
338
330
339
331
error: diagnostic slug not specified
340
- --> $DIR/diagnostic-derive.rs:583 :1
332
+ --> $DIR/diagnostic-derive.rs:582 :1
341
333
|
342
334
LL | #[error(no_crate_example, code = E0123)]
343
335
| ^
344
336
|
345
337
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
346
338
347
339
error: `#[warn_(...)]` is not a valid attribute
348
- --> $DIR/diagnostic-derive.rs:590 :1
340
+ --> $DIR/diagnostic-derive.rs:589 :1
349
341
|
350
342
LL | #[warn_(no_crate_example, code = E0123)]
351
343
| ^
352
344
353
345
error: diagnostic slug not specified
354
- --> $DIR/diagnostic-derive.rs:590 :1
346
+ --> $DIR/diagnostic-derive.rs:589 :1
355
347
|
356
348
LL | #[warn_(no_crate_example, code = E0123)]
357
349
| ^
358
350
|
359
351
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
360
352
361
353
error: `#[lint(...)]` is not a valid attribute
362
- --> $DIR/diagnostic-derive.rs:597 :1
354
+ --> $DIR/diagnostic-derive.rs:596 :1
363
355
|
364
356
LL | #[lint(no_crate_example, code = E0123)]
365
357
| ^
366
358
367
359
error: diagnostic slug not specified
368
- --> $DIR/diagnostic-derive.rs:597 :1
360
+ --> $DIR/diagnostic-derive.rs:596 :1
369
361
|
370
362
LL | #[lint(no_crate_example, code = E0123)]
371
363
| ^
372
364
|
373
365
= help: specify the slug as the first argument to the `#[diag(...)]` attribute, such as `#[diag(hir_analysis_example_error)]`
374
366
375
367
error: `#[lint(...)]` is not a valid attribute
376
- --> $DIR/diagnostic-derive.rs:604 :1
368
+ --> $DIR/diagnostic-derive.rs:603 :1
377
369
|
378
370
LL | #[lint(no_crate_example, code = E0123)]
379
371
| ^
380
372
381
373
error: `#[lint(...)]` is not a valid attribute
382
- --> $DIR/diagnostic-derive.rs:604 :1
374
+ --> $DIR/diagnostic-derive.rs:603 :1
383
375
|
384
376
LL | #[lint(no_crate_example, code = E0123)]
385
377
| ^
386
378
|
387
379
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
388
380
389
381
error: diagnostic slug not specified
390
- --> $DIR/diagnostic-derive.rs:604 :1
382
+ --> $DIR/diagnostic-derive.rs:603 :1
391
383
|
392
384
LL | #[lint(no_crate_example, code = E0123)]
393
385
| ^
394
386
|
395
387
= help: specify the slug as the first argument to the attribute, such as `#[diag(compiletest_example)]`
396
388
397
389
error: specified multiple times
398
- --> $DIR/diagnostic-derive.rs:614 :53
390
+ --> $DIR/diagnostic-derive.rs:613 :53
399
391
|
400
392
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
401
393
| ^^^^
402
394
|
403
395
note: previously specified here
404
- --> $DIR/diagnostic-derive.rs:614 :39
396
+ --> $DIR/diagnostic-derive.rs:613 :39
405
397
|
406
398
LL | #[suggestion(no_crate_suggestion, code = "...", code = ",,,")]
407
399
| ^^^^
408
400
409
401
error: wrong types for suggestion
410
- --> $DIR/diagnostic-derive.rs:623 :24
402
+ --> $DIR/diagnostic-derive.rs:622 :24
411
403
|
412
404
LL | suggestion: (Span, usize),
413
405
| ^^^^^
414
406
|
415
407
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
416
408
417
409
error: wrong types for suggestion
418
- --> $DIR/diagnostic-derive.rs:631 :17
410
+ --> $DIR/diagnostic-derive.rs:630 :17
419
411
|
420
412
LL | suggestion: (Span,),
421
413
| ^^^^^^^
422
414
|
423
415
= help: `#[suggestion(...)]` on a tuple field must be applied to fields of type `(Span, Applicability)`
424
416
425
417
error: suggestion without `code = "..."`
426
- --> $DIR/diagnostic-derive.rs:638 :5
418
+ --> $DIR/diagnostic-derive.rs:637 :5
427
419
|
428
420
LL | #[suggestion(no_crate_suggestion)]
429
421
| ^
430
422
431
423
error: `#[multipart_suggestion(...)]` is not a valid attribute
432
- --> $DIR/diagnostic-derive.rs:645 :1
424
+ --> $DIR/diagnostic-derive.rs:644 :1
433
425
|
434
426
LL | #[multipart_suggestion(no_crate_suggestion)]
435
427
| ^
436
428
|
437
429
= help: consider creating a `Subdiagnostic` instead
438
430
439
431
error: `#[multipart_suggestion(...)]` is not a valid attribute
440
- --> $DIR/diagnostic-derive.rs:648 :1
432
+ --> $DIR/diagnostic-derive.rs:647 :1
441
433
|
442
434
LL | #[multipart_suggestion()]
443
435
| ^
444
436
|
445
437
= help: consider creating a `Subdiagnostic` instead
446
438
447
439
error: `#[multipart_suggestion(...)]` is not a valid attribute
448
- --> $DIR/diagnostic-derive.rs:652 :5
440
+ --> $DIR/diagnostic-derive.rs:651 :5
449
441
|
450
442
LL | #[multipart_suggestion(no_crate_suggestion)]
451
443
| ^
452
444
|
453
445
= help: consider creating a `Subdiagnostic` instead
454
446
455
447
error: `#[suggestion(...)]` is not a valid attribute
456
- --> $DIR/diagnostic-derive.rs:660 :1
448
+ --> $DIR/diagnostic-derive.rs:659 :1
457
449
|
458
450
LL | #[suggestion(no_crate_suggestion, code = "...")]
459
451
| ^
460
452
|
461
453
= help: `#[label]` and `#[suggestion]` can only be applied to fields
462
454
463
455
error: `#[label]` is not a valid attribute
464
- --> $DIR/diagnostic-derive.rs:669 :1
456
+ --> $DIR/diagnostic-derive.rs:668 :1
465
457
|
466
458
LL | #[label]
467
459
| ^
468
460
|
469
461
= help: `#[label]` and `#[suggestion]` can only be applied to fields
470
462
471
463
error: `#[subdiagnostic(...)]` is not a valid attribute
472
- --> $DIR/diagnostic-derive.rs:703 :5
464
+ --> $DIR/diagnostic-derive.rs:702 :5
473
465
|
474
466
LL | #[subdiagnostic(bad)]
475
467
| ^
476
468
477
469
error: `#[subdiagnostic = ...]` is not a valid attribute
478
- --> $DIR/diagnostic-derive.rs:711 :5
470
+ --> $DIR/diagnostic-derive.rs:710 :5
479
471
|
480
472
LL | #[subdiagnostic = "bad"]
481
473
| ^
482
474
483
475
error: `#[subdiagnostic(...)]` is not a valid attribute
484
- --> $DIR/diagnostic-derive.rs:719 :5
476
+ --> $DIR/diagnostic-derive.rs:718 :5
485
477
|
486
478
LL | #[subdiagnostic(bad, bad)]
487
479
| ^
488
480
489
481
error: `#[subdiagnostic(...)]` is not a valid attribute
490
- --> $DIR/diagnostic-derive.rs:727 :5
482
+ --> $DIR/diagnostic-derive.rs:726 :5
491
483
|
492
484
LL | #[subdiagnostic("bad")]
493
485
| ^
494
486
495
487
error: `#[subdiagnostic(...)]` is not a valid attribute
496
- --> $DIR/diagnostic-derive.rs:735 :5
488
+ --> $DIR/diagnostic-derive.rs:734 :5
497
489
|
498
490
LL | #[subdiagnostic(eager)]
499
491
| ^
500
492
501
493
error: `#[subdiagnostic(...)]` is not a valid attribute
502
- --> $DIR/diagnostic-derive.rs:743 :5
494
+ --> $DIR/diagnostic-derive.rs:742 :5
503
495
|
504
496
LL | #[subdiagnostic(eager)]
505
497
| ^
506
498
507
499
error: `#[subdiagnostic(...)]` is not a valid attribute
508
- --> $DIR/diagnostic-derive.rs:764 :5
500
+ --> $DIR/diagnostic-derive.rs:763 :5
509
501
|
510
502
LL | #[subdiagnostic(eager)]
511
503
| ^
512
504
513
505
error: expected at least one string literal for `code(...)`
514
- --> $DIR/diagnostic-derive.rs:795 :23
506
+ --> $DIR/diagnostic-derive.rs:794 :23
515
507
|
516
508
LL | #[suggestion(code())]
517
509
| ^
518
510
519
511
error: `code(...)` must contain only string literals
520
- --> $DIR/diagnostic-derive.rs:803 :23
512
+ --> $DIR/diagnostic-derive.rs:802 :23
521
513
|
522
514
LL | #[suggestion(code(foo))]
523
515
| ^^^
524
516
525
517
error: `#[suggestion(...)]` is not a valid attribute
526
- --> $DIR/diagnostic-derive.rs:827 :5
518
+ --> $DIR/diagnostic-derive.rs:826 :5
527
519
|
528
520
LL | #[suggestion(no_crate_suggestion, code = "")]
529
521
| ^
@@ -539,13 +531,13 @@ LL | #[diag = "E0123"]
539
531
| ^ maybe a missing crate `core`?
540
532
541
533
error[E0433]: failed to resolve: maybe a missing crate `core`?
542
- --> $DIR/diagnostic-derive.rs:803 :23
534
+ --> $DIR/diagnostic-derive.rs:802 :23
543
535
|
544
536
LL | #[suggestion(code(foo))]
545
537
| ^^^ maybe a missing crate `core`?
546
538
547
539
error[E0433]: failed to resolve: maybe a missing crate `core`?
548
- --> $DIR/diagnostic-derive.rs:812 :25
540
+ --> $DIR/diagnostic-derive.rs:811 :25
549
541
|
550
542
LL | #[suggestion(code = 3)]
551
543
| ^ maybe a missing crate `core`?
@@ -563,43 +555,43 @@ LL | #[nonsense]
563
555
| ^^^^^^^^
564
556
565
557
error: cannot find attribute `error` in this scope
566
- --> $DIR/diagnostic-derive.rs:583 :3
558
+ --> $DIR/diagnostic-derive.rs:582 :3
567
559
|
568
560
LL | #[error(no_crate_example, code = E0123)]
569
561
| ^^^^^
570
562
571
563
error: cannot find attribute `warn_` in this scope
572
- --> $DIR/diagnostic-derive.rs:590 :3
564
+ --> $DIR/diagnostic-derive.rs:589 :3
573
565
|
574
566
LL | #[warn_(no_crate_example, code = E0123)]
575
567
| ^^^^^ help: a built-in attribute with a similar name exists: `warn`
576
568
577
569
error: cannot find attribute `lint` in this scope
578
- --> $DIR/diagnostic-derive.rs:597 :3
570
+ --> $DIR/diagnostic-derive.rs:596 :3
579
571
|
580
572
LL | #[lint(no_crate_example, code = E0123)]
581
573
| ^^^^ help: a built-in attribute with a similar name exists: `link`
582
574
583
575
error: cannot find attribute `lint` in this scope
584
- --> $DIR/diagnostic-derive.rs:604 :3
576
+ --> $DIR/diagnostic-derive.rs:603 :3
585
577
|
586
578
LL | #[lint(no_crate_example, code = E0123)]
587
579
| ^^^^ help: a built-in attribute with a similar name exists: `link`
588
580
589
581
error: cannot find attribute `multipart_suggestion` in this scope
590
- --> $DIR/diagnostic-derive.rs:645 :3
582
+ --> $DIR/diagnostic-derive.rs:644 :3
591
583
|
592
584
LL | #[multipart_suggestion(no_crate_suggestion)]
593
585
| ^^^^^^^^^^^^^^^^^^^^
594
586
595
587
error: cannot find attribute `multipart_suggestion` in this scope
596
- --> $DIR/diagnostic-derive.rs:648 :3
588
+ --> $DIR/diagnostic-derive.rs:647 :3
597
589
|
598
590
LL | #[multipart_suggestion()]
599
591
| ^^^^^^^^^^^^^^^^^^^^
600
592
601
593
error: cannot find attribute `multipart_suggestion` in this scope
602
- --> $DIR/diagnostic-derive.rs:652 :7
594
+ --> $DIR/diagnostic-derive.rs:651 :7
603
595
|
604
596
LL | #[multipart_suggestion(no_crate_suggestion)]
605
597
| ^^^^^^^^^^^^^^^^^^^^
@@ -611,7 +603,7 @@ LL | #[diag(nonsense, code = E0123)]
611
603
| ^^^^^^^^ not found in `crate::fluent_generated`
612
604
613
605
error[E0425]: cannot find value `__code_34` in this scope
614
- --> $DIR/diagnostic-derive.rs:809 :10
606
+ --> $DIR/diagnostic-derive.rs:808 :10
615
607
|
616
608
LL | #[derive(Diagnostic)]
617
609
| ^^^^^^^^^^ not found in this scope
@@ -632,7 +624,7 @@ note: required by a bound in `Diag::<'a, G>::arg`
632
624
--> $COMPILER_DIR/rustc_errors/src/diagnostic.rs:LL:CC
633
625
= note: this error originates in the macro `with_fn` (in Nightly builds, run with -Z macro-backtrace for more info)
634
626
635
- error: aborting due to 86 previous errors
627
+ error: aborting due to 85 previous errors
636
628
637
629
Some errors have detailed explanations: E0277, E0425, E0433.
638
630
For more information about an error, try `rustc --explain E0277`.
0 commit comments