From e82bca6f32bd74e018c8bd46fe33986eae514189 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 23 Oct 2024 08:18:19 +0100 Subject: remove no longer needd UnstableFeature type --- compiler/rustc_feature/src/lib.rs | 4 ++-- compiler/rustc_feature/src/unstable.rs | 16 +++++----------- 2 files changed, 7 insertions(+), 13 deletions(-) (limited to 'compiler/rustc_feature/src') diff --git a/compiler/rustc_feature/src/lib.rs b/compiler/rustc_feature/src/lib.rs index 8f4c0b0ac95..7c4996c1412 100644 --- a/compiler/rustc_feature/src/lib.rs +++ b/compiler/rustc_feature/src/lib.rs @@ -94,8 +94,8 @@ impl UnstableFeatures { fn find_lang_feature_issue(feature: Symbol) -> Option> { // Search in all the feature lists. - if let Some(f) = UNSTABLE_FEATURES.iter().find(|f| f.feature.name == feature) { - return f.feature.issue; + if let Some(f) = UNSTABLE_FEATURES.iter().find(|f| f.name == feature) { + return f.issue; } if let Some(f) = ACCEPTED_FEATURES.iter().find(|f| f.name == feature) { return f.issue; diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index 93e91c0984c..9c6de079e2f 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -6,10 +6,6 @@ use rustc_span::symbol::{Symbol, sym}; use super::{Feature, to_nonzero}; -pub struct UnstableFeature { - pub feature: Feature, -} - #[derive(PartialEq)] enum FeatureStatus { Default, @@ -82,13 +78,11 @@ macro_rules! declare_features { )+) => { /// Unstable language features that are being implemented or being /// considered for acceptance (stabilization) or removal. - pub const UNSTABLE_FEATURES: &[UnstableFeature] = &[ - $(UnstableFeature { - feature: Feature { - name: sym::$feature, - since: $ver, - issue: to_nonzero($issue), - }, + pub const UNSTABLE_FEATURES: &[Feature] = &[ + $(Feature { + name: sym::$feature, + since: $ver, + issue: to_nonzero($issue), }),+ ]; -- cgit 1.4.1-3-g733a5