1
Fork 0
rust/compiler/rustc_middle/src
bors be01dabfef 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](https://github.com/rust-lang/rust/pull/131321#issuecomment-2402068336), 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`
2024-10-23 12:16:41 +00:00
..
dep_graph Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir rm ItemKind::OpaqueTy 2024-10-04 23:28:22 +00:00
hooks Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
infer move defining_opaque_types out of Canonical 2024-10-17 10:22:52 +02:00
middle terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it) 2024-10-22 07:37:54 +01:00
mir nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
query Rollup merge of #131802 - compiler-errors:fnonce-coverage, r=Zalathar 2024-10-18 12:00:51 +01:00
thir various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
traits nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
ty Auto merge of #132027 - RalfJung:lang-feature-bool-fields, r=nnethercote 2024-10-23 12:16:41 +00:00
util Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
arena.rs Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
error.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
lib.rs move strict provenance lints to new feature gate, remove old feature gates 2024-10-21 15:22:17 +01:00
lint.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
values.rs only query params_in_repr if def kind is adt 2024-10-02 17:36:31 +08:00