Commit e941e50
authored
Rollup merge of rust-lang#67806 - Centril:splitsynmore, r=petrochenkov
Extract `rustc_ast_passes`, move gating, & refactor linting
Based on rust-lang#67770.
This PR extracts a crate `rustc_ast_passes`:
- `ast_validation.rs`, which is contributed by `rustc_passes` (now only has HIR based passes) -- the goal here is to improve recompilation of the parser,
- `feature_gate.rs`, which is contributed by `syntax` and performs post-expansion-gating & final erroring for pre-expansion gating,
- `show_span`, which is contributed by `syntax`.
To facilitate this, we first have to also:
- Move `{leveled_}feature_err{_err}` from `syntax::feature_gate::check` into `rustc_session::parse`.
- Move `get_features` into `rustc_parse::config`, the only place it is used.
- Move some some lint datatypes and traits, e.g. `LintBuffer`, `BufferedEarlyLint`, `BuiltinLintDiagnostics`, `LintPass`, and `LintArray` into `rustc_session::lint`.
- Move all the hard-wired lint `static`s into `rustc_session::lint::builtin`.File tree
59 files changed
+711
-679
lines changed- src
- librustc_ast_lowering
- librustc_ast_passes
- librustc_builtin_macros
- librustc_expand
- mbe
- librustc_interface
- librustc_lint
- librustc_metadata
- librustc_mir
- hair/pattern
- transform/check_consts
- librustc_parse
- librustc_passes
- librustc_resolve
- librustc_session
- lint
- librustc_typeck
- check
- librustc
- lint
- middle
- libsyntax
- attr
- test/ui-fulldeps/internal-lints
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+711
-679
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3374 | 3374 | | |
3375 | 3375 | | |
3376 | 3376 | | |
| 3377 | + | |
| 3378 | + | |
| 3379 | + | |
| 3380 | + | |
| 3381 | + | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
| 3388 | + | |
| 3389 | + | |
| 3390 | + | |
| 3391 | + | |
3377 | 3392 | | |
3378 | 3393 | | |
3379 | 3394 | | |
| |||
3386 | 3401 | | |
3387 | 3402 | | |
3388 | 3403 | | |
| 3404 | + | |
3389 | 3405 | | |
3390 | 3406 | | |
3391 | 3407 | | |
| |||
3539 | 3555 | | |
3540 | 3556 | | |
3541 | 3557 | | |
| 3558 | + | |
3542 | 3559 | | |
3543 | 3560 | | |
3544 | 3561 | | |
3545 | 3562 | | |
3546 | 3563 | | |
| 3564 | + | |
3547 | 3565 | | |
3548 | 3566 | | |
3549 | 3567 | | |
| |||
3613 | 3631 | | |
3614 | 3632 | | |
3615 | 3633 | | |
| 3634 | + | |
3616 | 3635 | | |
3617 | 3636 | | |
3618 | 3637 | | |
| |||
3630 | 3649 | | |
3631 | 3650 | | |
3632 | 3651 | | |
| 3652 | + | |
3633 | 3653 | | |
3634 | 3654 | | |
3635 | 3655 | | |
| |||
3768 | 3788 | | |
3769 | 3789 | | |
3770 | 3790 | | |
| 3791 | + | |
3771 | 3792 | | |
3772 | 3793 | | |
3773 | 3794 | | |
| |||
3786 | 3807 | | |
3787 | 3808 | | |
3788 | 3809 | | |
3789 | | - | |
| 3810 | + | |
3790 | 3811 | | |
3791 | 3812 | | |
3792 | 3813 | | |
| |||
3866 | 3887 | | |
3867 | 3888 | | |
3868 | 3889 | | |
| 3890 | + | |
3869 | 3891 | | |
3870 | 3892 | | |
3871 | 3893 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | 22 | | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
| 33 | + | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 68 | | |
79 | 69 | | |
80 | 70 | | |
| |||
477 | 467 | | |
478 | 468 | | |
479 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
480 | 512 | | |
481 | 513 | | |
482 | 514 | | |
| |||
495 | 527 | | |
496 | 528 | | |
497 | 529 | | |
498 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
499 | 609 | | |
500 | 610 | | |
501 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | | - | |
| 8 | + | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
0 commit comments