-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit be01dab
Auto merge of #132027 - RalfJung:lang-feature-bool-fields, r=nnethercote
nightly feature tracking: get rid of the per-feature bool fields
The `struct Features` that tracks which features are enabled has a ton of public `bool`-typed fields that are basically caching the result of looking up the corresponding feature in `enabled_lang_features`. Having public fields with an invariant is not great, so at least they should be made private. However, it turns out caching these lookups is actually [not worth it](#131321 (comment)), so this PR just entirely gets rid of these fields. (The alternative would be to make them private and have a method for each of them to expose them in a read-only way. Most of the diff of this PR would be the same in that case.)
r? `@nnethercote`File tree
111 files changed
+324
-385
lines changed- compiler
- rustc_ast_lowering/src
- rustc_ast_passes/src
- rustc_attr/src
- rustc_borrowck/src/type_check
- rustc_builtin_macros/src
- rustc_codegen_ssa/src
- rustc_const_eval/src/check_consts
- rustc_expand/src
- mbe
- rustc_feature/src
- rustc_hir_analysis/src
- check
- coherence
- collect
- hir_ty_lowering
- outlives
- rustc_hir_typeck/src
- fn_ctxt
- method
- rustc_incremental/src
- persist
- rustc_lint/src
- rustc_metadata/src
- rmeta
- rustc_middle/src
- mir/interpret
- traits
- ty
- print
- rustc_mir_build/src
- build
- expr
- matches
- thir
- cx
- pattern
- rustc_mir_transform/src
- rustc_passes/src
- rustc_pattern_analysis/src
- rustc_query_system/src/ich
- rustc_resolve/src
- late
- rustc_symbol_mangling/src
- rustc_trait_selection/src
- error_reporting/traits
- traits
- select
- specialize
- rustc_ty_utils/src
- src
- librustdoc
- clean
- passes
- tools/clippy/clippy_lints/src
- matches
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
111 files changed
+324
-385
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 | - | ||
52 | + | ||
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| |||
65 | 65 |
| |
66 | 66 |
| |
67 | 67 |
| |
68 | - | ||
68 | + | ||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| |||
237 | 237 |
| |
238 | 238 |
| |
239 | 239 |
| |
240 | - | ||
240 | + | ||
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
575 | 575 |
| |
576 | 576 |
| |
577 | 577 |
| |
578 | - | ||
578 | + | ||
579 | 579 |
| |
580 | 580 |
| |
581 | 581 |
| |
| |||
717 | 717 |
| |
718 | 718 |
| |
719 | 719 |
| |
720 | - | ||
720 | + | ||
721 | 721 |
| |
722 | 722 |
| |
723 | 723 |
| |
| |||
1572 | 1572 |
| |
1573 | 1573 |
| |
1574 | 1574 |
| |
1575 | - | ||
1575 | + | ||
1576 | 1576 |
| |
1577 | 1577 |
| |
1578 | 1578 |
| |
| |||
1584 | 1584 |
| |
1585 | 1585 |
| |
1586 | 1586 |
| |
1587 | - | ||
1587 | + | ||
1588 | 1588 |
| |
1589 | 1589 |
| |
1590 | 1590 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1512 | 1512 |
| |
1513 | 1513 |
| |
1514 | 1514 |
| |
1515 | - | ||
1515 | + | ||
1516 | 1516 |
| |
1517 | 1517 |
| |
1518 | 1518 |
| |
| |||
1530 | 1530 |
| |
1531 | 1531 |
| |
1532 | 1532 |
| |
1533 | - | ||
1533 | + | ||
1534 | 1534 |
| |
1535 | 1535 |
| |
1536 | 1536 |
| |
|
Lines changed: 6 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
196 | - | ||
196 | + | ||
197 | 197 |
| |
198 | 198 |
| |
199 | 199 |
| |
| |||
1035 | 1035 |
| |
1036 | 1036 |
| |
1037 | 1037 |
| |
1038 | - | ||
1038 | + | ||
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 | 1041 |
| |
| |||
1160 | 1160 |
| |
1161 | 1161 |
| |
1162 | 1162 |
| |
1163 | - | ||
1163 | + | ||
1164 | 1164 |
| |
1165 | 1165 |
| |
1166 | 1166 |
| |
| |||
1500 | 1500 |
| |
1501 | 1501 |
| |
1502 | 1502 |
| |
1503 | - | ||
1503 | + | ||
1504 | 1504 |
| |
1505 | 1505 |
| |
1506 | 1506 |
| |
| |||
1519 | 1519 |
| |
1520 | 1520 |
| |
1521 | 1521 |
| |
1522 | - | ||
1522 | + | ||
1523 | 1523 |
| |
1524 | 1524 |
| |
1525 | 1525 |
| |
| |||
2270 | 2270 |
| |
2271 | 2271 |
| |
2272 | 2272 |
| |
2273 | - | ||
2273 | + | ||
2274 | 2274 |
| |
2275 | 2275 |
| |
2276 | 2276 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
268 | 268 |
| |
269 | 269 |
| |
270 | 270 |
| |
271 | - | ||
271 | + | ||
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
| |||
496 | 496 |
| |
497 | 497 |
| |
498 | 498 |
| |
499 | - | ||
499 | + | ||
500 | 500 |
| |
501 | 501 |
| |
502 | 502 |
| |
|
Lines changed: 11 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
295 | 295 |
| |
296 | 296 |
| |
297 | 297 |
| |
298 | - | ||
298 | + | ||
299 | + | ||
299 | 300 |
| |
300 | 301 |
| |
301 | 302 |
| |
| |||
308 | 309 |
| |
309 | 310 |
| |
310 | 311 |
| |
311 | - | ||
312 | - | ||
313 | - | ||
314 | - | ||
315 | - | ||
316 | - | ||
317 | - | ||
312 | + | ||
313 | + | ||
314 | + | ||
315 | + | ||
316 | + | ||
317 | + | ||
318 | 318 |
| |
319 | 319 |
| |
320 | 320 |
| |
| |||
1145 | 1145 |
| |
1146 | 1146 |
| |
1147 | 1147 |
| |
1148 | - | ||
1148 | + | ||
1149 | 1149 |
| |
1150 | 1150 |
| |
1151 | 1151 |
| |
| |||
1286 | 1286 |
| |
1287 | 1287 |
| |
1288 | 1288 |
| |
1289 | - | ||
1289 | + | ||
1290 | 1290 |
| |
1291 | 1291 |
| |
1292 | 1292 |
| |
| |||
1299 | 1299 |
| |
1300 | 1300 |
| |
1301 | 1301 |
| |
1302 | - | ||
1302 | + | ||
1303 | 1303 |
| |
1304 | 1304 |
| |
1305 | 1305 |
| |
|
Lines changed: 9 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | - | ||
18 | + | ||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
24 | - | ||
24 | + | ||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
46 | - | ||
46 | + | ||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 | - | ||
59 | + | ||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 | - | ||
153 | + | ||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| |||
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
213 | - | ||
213 | + | ||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
| |||
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
473 | - | ||
473 | + | ||
474 | 474 |
| |
475 | 475 |
| |
476 | 476 |
| |
| |||
548 | 548 |
| |
549 | 549 |
| |
550 | 550 |
| |
551 | - | ||
551 | + | ||
552 | 552 |
| |
553 | 553 |
| |
554 | 554 |
| |
| |||
572 | 572 |
| |
573 | 573 |
| |
574 | 574 |
| |
575 | - | ||
575 | + | ||
576 | 576 |
| |
577 | 577 |
| |
578 | 578 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
622 | 622 |
| |
623 | 623 |
| |
624 | 624 |
| |
625 | - | ||
625 | + | ||
626 | 626 |
| |
627 | 627 |
| |
628 | 628 |
| |
| |||
711 | 711 |
| |
712 | 712 |
| |
713 | 713 |
| |
714 | - | ||
714 | + | ||
715 | 715 |
| |
716 | 716 |
| |
717 | 717 |
| |
| |||
831 | 831 |
| |
832 | 832 |
| |
833 | 833 |
| |
834 | - | ||
834 | + | ||
835 | 835 |
| |
836 | 836 |
| |
837 | 837 |
| |
| |||
891 | 891 |
| |
892 | 892 |
| |
893 | 893 |
| |
894 | - | ||
894 | + | ||
895 | 895 |
| |
896 | 896 |
| |
897 | 897 |
| |
| |||
909 | 909 |
| |
910 | 910 |
| |
911 | 911 |
| |
912 | - | ||
912 | + | ||
913 | 913 |
| |
914 | 914 |
| |
915 | 915 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1035 | 1035 |
| |
1036 | 1036 |
| |
1037 | 1037 |
| |
1038 | - | ||
1038 | + | ||
1039 | 1039 |
| |
1040 | 1040 |
| |
1041 | 1041 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 | - | ||
72 | + | ||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
|
0 commit comments