Commit b772b5b
authored
Rollup merge of rust-lang#66895 - Centril:rustc_feature, r=oli-obk
Feature gating *declarations* => new crate `rustc_feature`
This PR moves the data-oriented parts of feature gating into its own crate, `rustc_feature`.
The parts consist of some data types as well as `accepted`, `active`, `removed`, and `builtin_attrs`.
Feature gate checking itself remains in `syntax::feature_gate::check`. The parts which define how to emit feature gate errors could probably be moved to `rustc_errors` or to the new `rustc_session` crate introduced in rust-lang#66878. The visitor itself could probably be moved as a pass in `rustc_passes` depending on how the dependency edges work out.
The PR also contains some drive-by cleanup of feature gate checking. As such, the PR probably best read commit-by-commit.
r? @oli-obk
cc @petrochenkov
cc @Mark-SimulacrumFile tree
62 files changed
+444
-460
lines changed- src
- librustc_codegen_llvm
- librustc_driver
- librustc_feature
- librustc_lint
- librustc_metadata
- librustc_mir/transform/check_consts
- librustc_parse
- librustc_passes
- librustc_resolve
- librustc_typeck
- check
- librustc
- ich
- lint
- middle
- query
- session
- ty
- query
- librustdoc
- clean
- html
- passes
- libsyntax_expand
- mbe
- libsyntax_ext
- libsyntax
- attr
- feature_gate
- tools/tidy/src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
62 files changed
+444
-460
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3199 | 3199 | | |
3200 | 3200 | | |
3201 | 3201 | | |
| 3202 | + | |
3202 | 3203 | | |
3203 | 3204 | | |
3204 | 3205 | | |
| |||
3574 | 3575 | | |
3575 | 3576 | | |
3576 | 3577 | | |
| 3578 | + | |
3577 | 3579 | | |
3578 | 3580 | | |
3579 | 3581 | | |
| |||
3607 | 3609 | | |
3608 | 3610 | | |
3609 | 3611 | | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
3610 | 3621 | | |
3611 | 3622 | | |
3612 | 3623 | | |
| |||
3682 | 3693 | | |
3683 | 3694 | | |
3684 | 3695 | | |
| 3696 | + | |
3685 | 3697 | | |
3686 | 3698 | | |
3687 | 3699 | | |
| |||
3786 | 3798 | | |
3787 | 3799 | | |
3788 | 3800 | | |
| 3801 | + | |
3789 | 3802 | | |
3790 | 3803 | | |
3791 | 3804 | | |
| |||
3802 | 3815 | | |
3803 | 3816 | | |
3804 | 3817 | | |
| 3818 | + | |
3805 | 3819 | | |
3806 | 3820 | | |
3807 | 3821 | | |
| |||
3844 | 3858 | | |
3845 | 3859 | | |
3846 | 3860 | | |
| 3861 | + | |
3847 | 3862 | | |
3848 | 3863 | | |
3849 | 3864 | | |
| |||
4442 | 4457 | | |
4443 | 4458 | | |
4444 | 4459 | | |
| 4460 | + | |
4445 | 4461 | | |
4446 | 4462 | | |
4447 | 4463 | | |
| |||
4458 | 4474 | | |
4459 | 4475 | | |
4460 | 4476 | | |
| 4477 | + | |
4461 | 4478 | | |
4462 | 4479 | | |
4463 | 4480 | | |
| |||
4475 | 4492 | | |
4476 | 4493 | | |
4477 | 4494 | | |
| 4495 | + | |
4478 | 4496 | | |
4479 | 4497 | | |
4480 | 4498 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
156 | 155 | | |
157 | 156 | | |
158 | 157 | | |
159 | | - | |
| 158 | + | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
240 | 239 | | |
241 | | - | |
| 240 | + | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
512 | 513 | | |
513 | 514 | | |
514 | 515 | | |
515 | | - | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
845 | | - | |
846 | | - | |
847 | | - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
848 | 850 | | |
849 | 851 | | |
850 | 852 | | |
851 | | - | |
852 | | - | |
853 | | - | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
854 | 858 | | |
855 | 859 | | |
856 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1130 | 1130 | | |
1131 | 1131 | | |
1132 | 1132 | | |
1133 | | - | |
| 1133 | + | |
1134 | 1134 | | |
1135 | 1135 | | |
1136 | 1136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
2701 | 2701 | | |
2702 | 2702 | | |
2703 | 2703 | | |
2704 | | - | |
| 2704 | + | |
2705 | 2705 | | |
2706 | 2706 | | |
2707 | 2707 | | |
| |||
2850 | 2850 | | |
2851 | 2851 | | |
2852 | 2852 | | |
| 2853 | + | |
2853 | 2854 | | |
2854 | 2855 | | |
2855 | | - | |
2856 | 2856 | | |
2857 | 2857 | | |
2858 | 2858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
89 | | - | |
| 88 | + | |
90 | 89 | | |
91 | 90 | | |
92 | 91 | | |
| |||
470 | 469 | | |
471 | 470 | | |
472 | 471 | | |
473 | | - | |
| 472 | + | |
474 | 473 | | |
475 | 474 | | |
476 | 475 | | |
477 | | - | |
| 476 | + | |
478 | 477 | | |
479 | 478 | | |
480 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
| |||
1312 | 1311 | | |
1313 | 1312 | | |
1314 | 1313 | | |
1315 | | - | |
| 1314 | + | |
1316 | 1315 | | |
1317 | 1316 | | |
1318 | 1317 | | |
| |||
0 commit comments