diff options
| author | bors <bors@rust-lang.org> | 2024-10-23 12:16:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-23 12:16:41 +0000 |
| commit | be01dabfefd2daa4574b974f571c7852085d60cb (patch) | |
| tree | f8efa24426133446fa9c3a55be505d55e3045a5b /compiler/rustc_feature/src/removed.rs | |
| parent | ffd978b7bf4ccdc74fe6c1b048d253eb3f3aa341 (diff) | |
| parent | 44638853f545632c68d9a85f85df3418ae09f248 (diff) | |
| download | rust-be01dabfefd2daa4574b974f571c7852085d60cb.tar.gz rust-be01dabfefd2daa4574b974f571c7852085d60cb.zip | |
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`
Diffstat (limited to 'compiler/rustc_feature/src/removed.rs')
| -rw-r--r-- | compiler/rustc_feature/src/removed.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_feature/src/removed.rs b/compiler/rustc_feature/src/removed.rs index d797fee000d..fe3a67fd667 100644 --- a/compiler/rustc_feature/src/removed.rs +++ b/compiler/rustc_feature/src/removed.rs @@ -14,7 +14,7 @@ macro_rules! declare_features { $(#[doc = $doc:tt])* (removed, $feature:ident, $ver:expr, $issue:expr, $reason:expr), )+) => { /// Formerly unstable features that have now been removed. - pub const REMOVED_FEATURES: &[RemovedFeature] = &[ + pub const REMOVED_LANG_FEATURES: &[RemovedFeature] = &[ $(RemovedFeature { feature: Feature { name: sym::$feature, |
