1use std::path::PathBuf;
4use std::time::{SystemTime, UNIX_EPOCH};
5
6use rustc_data_structures::AtomicRef;
7use rustc_data_structures::fx::FxHashSet;
8use rustc_span::{Span, Symbol, sym};
9
10use super::{Feature, to_nonzero};
11
12fn default_track_feature(_: Symbol) {}
13
14pub static TRACK_FEATURE: AtomicRef<fn(Symbol)> = AtomicRef::new(&(default_track_feature as _));
17
18#[derive(#[automatically_derived]
impl ::core::cmp::PartialEq for FeatureStatus {
#[inline]
fn eq(&self, other: &FeatureStatus) -> bool {
let __self_discr = ::core::intrinsics::discriminant_value(self);
let __arg1_discr = ::core::intrinsics::discriminant_value(other);
__self_discr == __arg1_discr
}
}PartialEq)]
19enum FeatureStatus {
20 Default,
21 Incomplete,
22 Internal,
23}
24
25macro_rules! status_to_enum {
26 (unstable) => {
27 FeatureStatus::Default
28 };
29 (incomplete) => {
30 FeatureStatus::Incomplete
31 };
32 (internal) => {
33 FeatureStatus::Internal
34 };
35}
36
37#[derive(#[automatically_derived]
impl ::core::clone::Clone for Features {
#[inline]
fn clone(&self) -> Features {
Features {
enabled_lang_features: ::core::clone::Clone::clone(&self.enabled_lang_features),
enabled_lib_features: ::core::clone::Clone::clone(&self.enabled_lib_features),
enabled_features: ::core::clone::Clone::clone(&self.enabled_features),
}
}
}Clone, #[automatically_derived]
impl ::core::default::Default for Features {
#[inline]
fn default() -> Features {
Features {
enabled_lang_features: ::core::default::Default::default(),
enabled_lib_features: ::core::default::Default::default(),
enabled_features: ::core::default::Default::default(),
}
}
}Default, #[automatically_derived]
impl ::core::fmt::Debug for Features {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f, "Features",
"enabled_lang_features", &self.enabled_lang_features,
"enabled_lib_features", &self.enabled_lib_features,
"enabled_features", &&self.enabled_features)
}
}Debug)]
46pub struct Features {
47 enabled_lang_features: Vec<EnabledLangFeature>,
49 enabled_lib_features: Vec<EnabledLibFeature>,
51 enabled_features: FxHashSet<Symbol>,
53}
54
55#[derive(#[automatically_derived]
impl ::core::fmt::Debug for EnabledLangFeature {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field3_finish(f,
"EnabledLangFeature", "gate_name", &self.gate_name, "attr_sp",
&self.attr_sp, "stable_since", &&self.stable_since)
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for EnabledLangFeature { }Copy, #[automatically_derived]
impl ::core::clone::Clone for EnabledLangFeature {
#[inline]
fn clone(&self) -> EnabledLangFeature {
let _: ::core::clone::AssertParamIsClone<Symbol>;
let _: ::core::clone::AssertParamIsClone<Span>;
let _: ::core::clone::AssertParamIsClone<Option<Symbol>>;
*self
}
}Clone)]
57pub struct EnabledLangFeature {
58 pub gate_name: Symbol,
60 pub attr_sp: Span,
62 pub stable_since: Option<Symbol>,
64}
65
66#[derive(#[automatically_derived]
impl ::core::fmt::Debug for EnabledLibFeature {
#[inline]
fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result {
::core::fmt::Formatter::debug_struct_field2_finish(f,
"EnabledLibFeature", "gate_name", &self.gate_name, "attr_sp",
&&self.attr_sp)
}
}Debug, #[automatically_derived]
impl ::core::marker::Copy for EnabledLibFeature { }Copy, #[automatically_derived]
impl ::core::clone::Clone for EnabledLibFeature {
#[inline]
fn clone(&self) -> EnabledLibFeature {
let _: ::core::clone::AssertParamIsClone<Symbol>;
let _: ::core::clone::AssertParamIsClone<Span>;
*self
}
}Clone)]
68pub struct EnabledLibFeature {
69 pub gate_name: Symbol,
70 pub attr_sp: Span,
71}
72
73impl Features {
74 pub fn set_enabled_lang_feature(&mut self, lang_feat: EnabledLangFeature) {
75 self.enabled_lang_features.push(lang_feat);
76 self.enabled_features.insert(lang_feat.gate_name);
77 }
78
79 pub fn set_enabled_lib_feature(&mut self, lib_feat: EnabledLibFeature) {
80 self.enabled_lib_features.push(lib_feat);
81 self.enabled_features.insert(lib_feat.gate_name);
82 }
83
84 pub fn enabled_lang_features(&self) -> &Vec<EnabledLangFeature> {
90 &self.enabled_lang_features
91 }
92
93 pub fn enabled_lib_features(&self) -> &Vec<EnabledLibFeature> {
94 &self.enabled_lib_features
95 }
96
97 pub fn enabled_features(&self) -> &FxHashSet<Symbol> {
98 &self.enabled_features
99 }
100
101 pub fn enabled_features_iter_stable_order(
103 &self,
104 ) -> impl Iterator<Item = (Symbol, Span)> + Clone {
105 self.enabled_lang_features
106 .iter()
107 .map(|feat| (feat.gate_name, feat.attr_sp))
108 .chain(self.enabled_lib_features.iter().map(|feat| (feat.gate_name, feat.attr_sp)))
109 }
110
111 pub fn enabled(&self, feature: Symbol) -> bool {
113 if self.enabled_features.contains(&feature) {
114 TRACK_FEATURE(feature);
115 true
116 } else {
117 false
118 }
119 }
120}
121
122macro_rules! declare_features {
123 ($(
124 $(#[doc = $doc:tt])* ($status:ident, $feature:ident, $ver:expr, $issue:expr),
125 )+) => {
126 pub static UNSTABLE_LANG_FEATURES: &[Feature] = &[
129 $(Feature {
130 name: sym::$feature,
131 since: $ver,
132 issue: to_nonzero($issue),
133 }),+
134 ];
135
136 impl Features {
137 $(
138 pub fn $feature(&self) -> bool {
139 self.enabled(sym::$feature)
140 }
141 )*
142
143 pub fn incomplete(&self, feature: Symbol) -> bool {
147 match feature {
148 $(
149 sym::$feature => status_to_enum!($status) == FeatureStatus::Incomplete,
150 )*
151 _ if self.enabled_features.contains(&feature) => {
152 false
155 }
156 _ => panic!("`{}` was not listed in `declare_features`", feature),
157 }
158 }
159
160 pub fn internal(&self, feature: Symbol) -> bool {
163 match feature {
164 $(
165 sym::$feature => status_to_enum!($status) == FeatureStatus::Internal,
166 )*
167 _ if self.enabled_features.contains(&feature) => {
168 let name = feature.as_str();
177 name == "core_intrinsics" || name.ends_with("_internal") || name.ends_with("_internals")
178 }
179 _ => panic!("`{}` was not listed in `declare_features`", feature),
180 }
181 }
182 }
183 };
184}
185
186#[rustfmt::skip]
204pub static UNSTABLE_LANG_FEATURES: &[Feature] =
&[Feature {
name: sym::abi_unadjusted,
since: "1.16.0",
issue: to_nonzero(None),
},
Feature {
name: sym::allocator_internals,
since: "1.20.0",
issue: to_nonzero(None),
},
Feature {
name: sym::allow_internal_unsafe,
since: "1.0.0",
issue: to_nonzero(None),
},
Feature {
name: sym::allow_internal_unstable,
since: "1.0.0",
issue: to_nonzero(None),
},
Feature {
name: sym::anonymous_lifetime_in_impl_trait,
since: "1.63.0",
issue: to_nonzero(None),
},
Feature {
name: sym::cfg_emscripten_wasm_eh,
since: "1.86.0",
issue: to_nonzero(None),
},
Feature {
name: sym::cfg_target_has_reliable_f16_f128,
since: "1.88.0",
issue: to_nonzero(None),
},
Feature {
name: sym::compiler_builtins,
since: "1.13.0",
issue: to_nonzero(None),
},
Feature {
name: sym::custom_mir,
since: "1.65.0",
issue: to_nonzero(None),
},
Feature {
name: sym::eii_internals,
since: "1.94.0",
issue: to_nonzero(None),
},
Feature {
name: sym::field_representing_type_raw,
since: "CURRENT_RUSTC_VERSION",
issue: to_nonzero(None),
},
Feature {
name: sym::generic_assert,
since: "1.63.0",
issue: to_nonzero(None),
},
Feature {
name: sym::intrinsics,
since: "1.0.0",
issue: to_nonzero(None),
},
Feature {
name: sym::lang_items,
since: "1.0.0",
issue: to_nonzero(None),
},
Feature {
name: sym::link_cfg,
since: "1.14.0",
issue: to_nonzero(None),
},
Feature {
name: sym::more_maybe_bounds,
since: "1.82.0",
issue: to_nonzero(None),
},
Feature {
name: sym::negative_bounds,
since: "1.71.0",
issue: to_nonzero(None),
},
Feature {
name: sym::pattern_complexity_limit,
since: "1.78.0",
issue: to_nonzero(None),
},
Feature {
name: sym::prelude_import,
since: "1.2.0",
issue: to_nonzero(None),
},
Feature {
name: sym::profiler_runtime,
since: "1.18.0",
issue: to_nonzero(None),
},
Feature {
name: sym::rustc_attrs,
since: "1.0.0",
issue: to_nonzero(None),
},
Feature {
name: sym::staged_api,
since: "1.0.0",
issue: to_nonzero(None),
},
Feature {
name: sym::test_unstable_lint,
since: "1.60.0",
issue: to_nonzero(None),
},
Feature {
name: sym::with_negative_coherence,
since: "1.60.0",
issue: to_nonzero(None),
},
Feature {
name: sym::abi_vectorcall,
since: "1.7.0",
issue: to_nonzero(Some(124485)),
},
Feature {
name: sym::auto_traits,
since: "1.50.0",
issue: to_nonzero(Some(13231)),
},
Feature {
name: sym::box_patterns,
since: "1.0.0",
issue: to_nonzero(Some(29641)),
},
Feature {
name: sym::builtin_syntax,
since: "1.71.0",
issue: to_nonzero(Some(110680)),
},
Feature {
name: sym::doc_notable_trait,
since: "1.52.0",
issue: to_nonzero(Some(45040)),
},
Feature {
name: sym::dropck_eyepatch,
since: "1.10.0",
issue: to_nonzero(Some(34761)),
},
Feature {
name: sym::fundamental,
since: "1.0.0",
issue: to_nonzero(Some(29635)),
},
Feature {
name: sym::link_llvm_intrinsics,
since: "1.0.0",
issue: to_nonzero(Some(29602)),
},
Feature {
name: sym::linkage,
since: "1.0.0",
issue: to_nonzero(Some(29603)),
},
Feature {
name: sym::needs_panic_runtime,
since: "1.10.0",
issue: to_nonzero(Some(32837)),
},
Feature {
name: sym::panic_runtime,
since: "1.10.0",
issue: to_nonzero(Some(32837)),
},
Feature {
name: sym::pattern_types,
since: "1.79.0",
issue: to_nonzero(Some(123646)),
},
Feature {
name: sym::rustc_private,
since: "1.0.0",
issue: to_nonzero(Some(27812)),
},
Feature {
name: sym::rustdoc_internals,
since: "1.58.0",
issue: to_nonzero(Some(90418)),
},
Feature {
name: sym::rustdoc_missing_doc_code_examples,
since: "1.31.0",
issue: to_nonzero(Some(101730)),
},
Feature {
name: sym::sized_hierarchy,
since: "1.89.0",
issue: to_nonzero(Some(144404)),
},
Feature {
name: sym::structural_match,
since: "1.8.0",
issue: to_nonzero(Some(31434)),
},
Feature {
name: sym::unboxed_closures,
since: "1.0.0",
issue: to_nonzero(Some(29625)),
},
Feature {
name: sym::unqualified_local_imports,
since: "1.83.0",
issue: to_nonzero(Some(138299)),
},
Feature {
name: sym::aarch64_unstable_target_feature,
since: "1.82.0",
issue: to_nonzero(Some(150244)),
},
Feature {
name: sym::aarch64_ver_target_feature,
since: "1.27.0",
issue: to_nonzero(Some(150245)),
},
Feature {
name: sym::abi_avr_interrupt,
since: "1.45.0",
issue: to_nonzero(Some(69664)),
},
Feature {
name: sym::abi_cmse_nonsecure_call,
since: "1.90.0",
issue: to_nonzero(Some(81391)),
},
Feature {
name: sym::abi_custom,
since: "1.89.0",
issue: to_nonzero(Some(140829)),
},
Feature {
name: sym::abi_gpu_kernel,
since: "1.86.0",
issue: to_nonzero(Some(135467)),
},
Feature {
name: sym::abi_msp430_interrupt,
since: "1.16.0",
issue: to_nonzero(Some(38487)),
},
Feature {
name: sym::abi_ptx,
since: "1.15.0",
issue: to_nonzero(Some(38788)),
},
Feature {
name: sym::abi_riscv_interrupt,
since: "1.73.0",
issue: to_nonzero(Some(111889)),
},
Feature {
name: sym::abi_x86_interrupt,
since: "1.17.0",
issue: to_nonzero(Some(40180)),
},
Feature {
name: sym::adt_const_params,
since: "1.56.0",
issue: to_nonzero(Some(95174)),
},
Feature {
name: sym::alloc_error_handler,
since: "1.29.0",
issue: to_nonzero(Some(51540)),
},
Feature {
name: sym::apx_target_feature,
since: "1.88.0",
issue: to_nonzero(Some(139284)),
},
Feature {
name: sym::arbitrary_self_types,
since: "1.23.0",
issue: to_nonzero(Some(44874)),
},
Feature {
name: sym::arbitrary_self_types_pointers,
since: "1.83.0",
issue: to_nonzero(Some(44874)),
},
Feature {
name: sym::arm_target_feature,
since: "1.27.0",
issue: to_nonzero(Some(150246)),
},
Feature {
name: sym::asm_experimental_arch,
since: "1.58.0",
issue: to_nonzero(Some(93335)),
},
Feature {
name: sym::asm_experimental_reg,
since: "1.85.0",
issue: to_nonzero(Some(133416)),
},
Feature {
name: sym::asm_goto_with_outputs,
since: "1.85.0",
issue: to_nonzero(Some(119364)),
},
Feature {
name: sym::asm_unwind,
since: "1.58.0",
issue: to_nonzero(Some(93334)),
},
Feature {
name: sym::associated_type_defaults,
since: "1.2.0",
issue: to_nonzero(Some(29661)),
},
Feature {
name: sym::async_drop,
since: "1.88.0",
issue: to_nonzero(Some(126482)),
},
Feature {
name: sym::async_fn_in_dyn_trait,
since: "1.85.0",
issue: to_nonzero(Some(133119)),
},
Feature {
name: sym::async_fn_track_caller,
since: "1.73.0",
issue: to_nonzero(Some(110011)),
},
Feature {
name: sym::async_for_loop,
since: "1.77.0",
issue: to_nonzero(Some(118898)),
},
Feature {
name: sym::async_trait_bounds,
since: "1.85.0",
issue: to_nonzero(Some(62290)),
},
Feature {
name: sym::avr_target_feature,
since: "1.95.0",
issue: to_nonzero(Some(146889)),
},
Feature {
name: sym::avx10_target_feature,
since: "1.88.0",
issue: to_nonzero(Some(138843)),
},
Feature {
name: sym::bpf_target_feature,
since: "1.54.0",
issue: to_nonzero(Some(150247)),
},
Feature {
name: sym::c_variadic,
since: "1.34.0",
issue: to_nonzero(Some(44930)),
},
Feature {
name: sym::c_variadic_naked_functions,
since: "1.93.0",
issue: to_nonzero(Some(148767)),
},
Feature {
name: sym::cfg_contract_checks,
since: "1.86.0",
issue: to_nonzero(Some(128044)),
},
Feature {
name: sym::cfg_overflow_checks,
since: "1.71.0",
issue: to_nonzero(Some(111466)),
},
Feature {
name: sym::cfg_relocation_model,
since: "1.73.0",
issue: to_nonzero(Some(114929)),
},
Feature {
name: sym::cfg_sanitize,
since: "1.41.0",
issue: to_nonzero(Some(39699)),
},
Feature {
name: sym::cfg_sanitizer_cfi,
since: "1.77.0",
issue: to_nonzero(Some(89653)),
},
Feature {
name: sym::cfg_target_compact,
since: "1.63.0",
issue: to_nonzero(Some(96901)),
},
Feature {
name: sym::cfg_target_has_atomic,
since: "1.60.0",
issue: to_nonzero(Some(94039)),
},
Feature {
name: sym::cfg_target_has_atomic_equal_alignment,
since: "1.60.0",
issue: to_nonzero(Some(93822)),
},
Feature {
name: sym::cfg_target_thread_local,
since: "1.7.0",
issue: to_nonzero(Some(29594)),
},
Feature {
name: sym::cfg_ub_checks,
since: "1.79.0",
issue: to_nonzero(Some(123499)),
},
Feature {
name: sym::cfg_version,
since: "1.45.0",
issue: to_nonzero(Some(64796)),
},
Feature {
name: sym::cfi_encoding,
since: "1.71.0",
issue: to_nonzero(Some(89653)),
},
Feature {
name: sym::closure_lifetime_binder,
since: "1.64.0",
issue: to_nonzero(Some(97362)),
},
Feature {
name: sym::closure_track_caller,
since: "1.57.0",
issue: to_nonzero(Some(87417)),
},
Feature {
name: sym::cmse_nonsecure_entry,
since: "1.48.0",
issue: to_nonzero(Some(75835)),
},
Feature {
name: sym::const_async_blocks,
since: "1.53.0",
issue: to_nonzero(Some(85368)),
},
Feature {
name: sym::const_block_items,
since: "1.95.0",
issue: to_nonzero(Some(149226)),
},
Feature {
name: sym::const_c_variadic,
since: "1.95.0",
issue: to_nonzero(Some(151787)),
},
Feature {
name: sym::const_closures,
since: "1.68.0",
issue: to_nonzero(Some(106003)),
},
Feature {
name: sym::const_destruct,
since: "1.85.0",
issue: to_nonzero(Some(133214)),
},
Feature {
name: sym::const_for,
since: "1.56.0",
issue: to_nonzero(Some(87575)),
},
Feature {
name: sym::const_precise_live_drops,
since: "1.46.0",
issue: to_nonzero(Some(73255)),
},
Feature {
name: sym::const_trait_impl,
since: "1.42.0",
issue: to_nonzero(Some(143874)),
},
Feature {
name: sym::const_try,
since: "1.56.0",
issue: to_nonzero(Some(74935)),
},
Feature {
name: sym::contracts,
since: "1.86.0",
issue: to_nonzero(Some(128044)),
},
Feature {
name: sym::contracts_internals,
since: "1.86.0",
issue: to_nonzero(Some(128044)),
},
Feature {
name: sym::coroutine_clone,
since: "1.65.0",
issue: to_nonzero(Some(95360)),
},
Feature {
name: sym::coroutines,
since: "1.21.0",
issue: to_nonzero(Some(43122)),
},
Feature {
name: sym::coverage_attribute,
since: "1.74.0",
issue: to_nonzero(Some(84605)),
},
Feature {
name: sym::csky_target_feature,
since: "1.73.0",
issue: to_nonzero(Some(150248)),
},
Feature {
name: sym::custom_inner_attributes,
since: "1.30.0",
issue: to_nonzero(Some(54726)),
},
Feature {
name: sym::custom_test_frameworks,
since: "1.30.0",
issue: to_nonzero(Some(50297)),
},
Feature {
name: sym::decl_macro,
since: "1.17.0",
issue: to_nonzero(Some(39412)),
},
Feature {
name: sym::default_field_values,
since: "1.85.0",
issue: to_nonzero(Some(132162)),
},
Feature {
name: sym::deprecated_suggestion,
since: "1.61.0",
issue: to_nonzero(Some(94785)),
},
Feature {
name: sym::deref_patterns,
since: "1.79.0",
issue: to_nonzero(Some(87121)),
},
Feature {
name: sym::derive_from,
since: "1.91.0",
issue: to_nonzero(Some(144889)),
},
Feature {
name: sym::diagnostic_on_const,
since: "1.93.0",
issue: to_nonzero(Some(143874)),
},
Feature {
name: sym::doc_cfg,
since: "1.21.0",
issue: to_nonzero(Some(43781)),
},
Feature {
name: sym::doc_masked,
since: "1.21.0",
issue: to_nonzero(Some(44027)),
},
Feature {
name: sym::effective_target_features,
since: "1.91.0",
issue: to_nonzero(Some(143352)),
},
Feature {
name: sym::ergonomic_clones,
since: "1.87.0",
issue: to_nonzero(Some(132290)),
},
Feature {
name: sym::ermsb_target_feature,
since: "1.49.0",
issue: to_nonzero(Some(150249)),
},
Feature {
name: sym::exhaustive_patterns,
since: "1.13.0",
issue: to_nonzero(Some(51085)),
},
Feature {
name: sym::explicit_extern_abis,
since: "1.88.0",
issue: to_nonzero(Some(134986)),
},
Feature {
name: sym::explicit_tail_calls,
since: "1.72.0",
issue: to_nonzero(Some(112788)),
},
Feature {
name: sym::export_stable,
since: "1.88.0",
issue: to_nonzero(Some(139939)),
},
Feature {
name: sym::extern_item_impls,
since: "1.94.0",
issue: to_nonzero(Some(125418)),
},
Feature {
name: sym::extern_types,
since: "1.23.0",
issue: to_nonzero(Some(43467)),
},
Feature {
name: sym::f128,
since: "1.78.0",
issue: to_nonzero(Some(116909)),
},
Feature {
name: sym::f16,
since: "1.78.0",
issue: to_nonzero(Some(116909)),
},
Feature {
name: sym::ffi_const,
since: "1.45.0",
issue: to_nonzero(Some(58328)),
},
Feature {
name: sym::ffi_pure,
since: "1.45.0",
issue: to_nonzero(Some(58329)),
},
Feature {
name: sym::field_projections,
since: "CURRENT_RUSTC_VERSION",
issue: to_nonzero(Some(145383)),
},
Feature {
name: sym::final_associated_functions,
since: "1.95.0",
issue: to_nonzero(Some(131179)),
},
Feature {
name: sym::fmt_debug,
since: "1.82.0",
issue: to_nonzero(Some(129709)),
},
Feature {
name: sym::fn_align,
since: "1.53.0",
issue: to_nonzero(Some(82232)),
},
Feature {
name: sym::fn_delegation,
since: "1.76.0",
issue: to_nonzero(Some(118212)),
},
Feature {
name: sym::freeze_impls,
since: "1.78.0",
issue: to_nonzero(Some(121675)),
},
Feature {
name: sym::frontmatter,
since: "1.88.0",
issue: to_nonzero(Some(136889)),
},
Feature {
name: sym::gen_blocks,
since: "1.75.0",
issue: to_nonzero(Some(117078)),
},
Feature {
name: sym::generic_const_exprs,
since: "1.56.0",
issue: to_nonzero(Some(76560)),
},
Feature {
name: sym::generic_const_items,
since: "1.73.0",
issue: to_nonzero(Some(113521)),
},
Feature {
name: sym::generic_const_parameter_types,
since: "1.87.0",
issue: to_nonzero(Some(137626)),
},
Feature {
name: sym::generic_pattern_types,
since: "1.86.0",
issue: to_nonzero(Some(136574)),
},
Feature {
name: sym::global_registration,
since: "1.80.0",
issue: to_nonzero(Some(125119)),
},
Feature {
name: sym::guard_patterns,
since: "1.85.0",
issue: to_nonzero(Some(129967)),
},
Feature {
name: sym::half_open_range_patterns_in_slices,
since: "1.66.0",
issue: to_nonzero(Some(67264)),
},
Feature {
name: sym::hexagon_target_feature,
since: "1.27.0",
issue: to_nonzero(Some(150250)),
},
Feature {
name: sym::impl_restriction,
since: "CURRENT_RUSTC_VERSION",
issue: to_nonzero(Some(105077)),
},
Feature {
name: sym::impl_trait_in_assoc_type,
since: "1.70.0",
issue: to_nonzero(Some(63063)),
},
Feature {
name: sym::impl_trait_in_bindings,
since: "1.64.0",
issue: to_nonzero(Some(63065)),
},
Feature {
name: sym::impl_trait_in_fn_trait_return,
since: "1.64.0",
issue: to_nonzero(Some(99697)),
},
Feature {
name: sym::import_trait_associated_functions,
since: "1.86.0",
issue: to_nonzero(Some(134691)),
},
Feature {
name: sym::inherent_associated_types,
since: "1.52.0",
issue: to_nonzero(Some(8995)),
},
Feature {
name: sym::intra_doc_pointers,
since: "1.51.0",
issue: to_nonzero(Some(80896)),
},
Feature {
name: sym::lahfsahf_target_feature,
since: "1.78.0",
issue: to_nonzero(Some(150251)),
},
Feature {
name: sym::large_assignments,
since: "1.52.0",
issue: to_nonzero(Some(83518)),
},
Feature {
name: sym::lazy_type_alias,
since: "1.72.0",
issue: to_nonzero(Some(112792)),
},
Feature {
name: sym::link_arg_attribute,
since: "1.76.0",
issue: to_nonzero(Some(99427)),
},
Feature {
name: sym::loongarch_target_feature,
since: "1.73.0",
issue: to_nonzero(Some(150252)),
},
Feature {
name: sym::loop_match,
since: "1.90.0",
issue: to_nonzero(Some(132306)),
},
Feature {
name: sym::m68k_target_feature,
since: "1.85.0",
issue: to_nonzero(Some(134328)),
},
Feature {
name: sym::macro_attr,
since: "1.91.0",
issue: to_nonzero(Some(143547)),
},
Feature {
name: sym::macro_derive,
since: "1.91.0",
issue: to_nonzero(Some(143549)),
},
Feature {
name: sym::macro_metavar_expr,
since: "1.61.0",
issue: to_nonzero(Some(83527)),
},
Feature {
name: sym::macro_metavar_expr_concat,
since: "1.81.0",
issue: to_nonzero(Some(124225)),
},
Feature {
name: sym::marker_trait_attr,
since: "1.30.0",
issue: to_nonzero(Some(29864)),
},
Feature {
name: sym::mgca_type_const_syntax,
since: "1.95.0",
issue: to_nonzero(Some(132980)),
},
Feature {
name: sym::min_generic_const_args,
since: "1.84.0",
issue: to_nonzero(Some(132980)),
},
Feature {
name: sym::min_specialization,
since: "1.7.0",
issue: to_nonzero(Some(31844)),
},
Feature {
name: sym::mips_target_feature,
since: "1.27.0",
issue: to_nonzero(Some(150253)),
},
Feature {
name: sym::more_qualified_paths,
since: "1.54.0",
issue: to_nonzero(Some(86935)),
},
Feature {
name: sym::movrs_target_feature,
since: "1.88.0",
issue: to_nonzero(Some(137976)),
},
Feature {
name: sym::multiple_supertrait_upcastable,
since: "1.69.0",
issue: to_nonzero(Some(150833)),
},
Feature {
name: sym::must_not_suspend,
since: "1.57.0",
issue: to_nonzero(Some(83310)),
},
Feature {
name: sym::mut_ref,
since: "1.79.0",
issue: to_nonzero(Some(123076)),
},
Feature {
name: sym::naked_functions_rustic_abi,
since: "1.88.0",
issue: to_nonzero(Some(138997)),
},
Feature {
name: sym::naked_functions_target_feature,
since: "1.86.0",
issue: to_nonzero(Some(138568)),
},
Feature {
name: sym::native_link_modifiers_as_needed,
since: "1.53.0",
issue: to_nonzero(Some(81490)),
},
Feature {
name: sym::negative_impls,
since: "1.44.0",
issue: to_nonzero(Some(68318)),
},
Feature {
name: sym::never_patterns,
since: "1.76.0",
issue: to_nonzero(Some(118155)),
},
Feature {
name: sym::never_type,
since: "1.13.0",
issue: to_nonzero(Some(35121)),
},
Feature {
name: sym::new_range,
since: "1.86.0",
issue: to_nonzero(Some(123741)),
},
Feature {
name: sym::no_core,
since: "1.3.0",
issue: to_nonzero(Some(29639)),
},
Feature {
name: sym::non_exhaustive_omitted_patterns_lint,
since: "1.57.0",
issue: to_nonzero(Some(89554)),
},
Feature {
name: sym::non_lifetime_binders,
since: "1.69.0",
issue: to_nonzero(Some(108185)),
},
Feature {
name: sym::nvptx_target_feature,
since: "1.91.0",
issue: to_nonzero(Some(150254)),
},
Feature {
name: sym::offset_of_enum,
since: "1.75.0",
issue: to_nonzero(Some(120141)),
},
Feature {
name: sym::offset_of_slice,
since: "1.81.0",
issue: to_nonzero(Some(126151)),
},
Feature {
name: sym::opaque_generic_const_args,
since: "1.95.0",
issue: to_nonzero(Some(151972)),
},
Feature {
name: sym::optimize_attribute,
since: "1.34.0",
issue: to_nonzero(Some(54882)),
},
Feature {
name: sym::patchable_function_entry,
since: "1.81.0",
issue: to_nonzero(Some(123115)),
},
Feature {
name: sym::pin_ergonomics,
since: "1.83.0",
issue: to_nonzero(Some(130494)),
},
Feature {
name: sym::postfix_match,
since: "1.79.0",
issue: to_nonzero(Some(121618)),
},
Feature {
name: sym::powerpc_target_feature,
since: "1.27.0",
issue: to_nonzero(Some(150255)),
},
Feature {
name: sym::prfchw_target_feature,
since: "1.78.0",
issue: to_nonzero(Some(150256)),
},
Feature {
name: sym::proc_macro_hygiene,
since: "1.30.0",
issue: to_nonzero(Some(54727)),
},
Feature {
name: sym::raw_dylib_elf,
since: "1.87.0",
issue: to_nonzero(Some(135694)),
},
Feature {
name: sym::reborrow,
since: "1.91.0",
issue: to_nonzero(Some(145612)),
},
Feature {
name: sym::ref_pat_eat_one_layer_2024,
since: "1.79.0",
issue: to_nonzero(Some(123076)),
},
Feature {
name: sym::ref_pat_eat_one_layer_2024_structural,
since: "1.81.0",
issue: to_nonzero(Some(123076)),
},
Feature {
name: sym::register_tool,
since: "1.41.0",
issue: to_nonzero(Some(66079)),
},
Feature {
name: sym::repr_simd,
since: "1.4.0",
issue: to_nonzero(Some(27731)),
},
Feature {
name: sym::return_type_notation,
since: "1.70.0",
issue: to_nonzero(Some(109417)),
},
Feature {
name: sym::riscv_target_feature,
since: "1.45.0",
issue: to_nonzero(Some(150257)),
},
Feature {
name: sym::rtm_target_feature,
since: "1.35.0",
issue: to_nonzero(Some(150258)),
},
Feature {
name: sym::rust_cold_cc,
since: "1.63.0",
issue: to_nonzero(Some(97544)),
},
Feature {
name: sym::rust_preserve_none_cc,
since: "1.95.0",
issue: to_nonzero(Some(151401)),
},
Feature {
name: sym::s390x_target_feature,
since: "1.82.0",
issue: to_nonzero(Some(150259)),
},
Feature {
name: sym::sanitize,
since: "1.91.0",
issue: to_nonzero(Some(39699)),
},
Feature {
name: sym::simd_ffi,
since: "1.0.0",
issue: to_nonzero(Some(27731)),
},
Feature {
name: sym::sparc_target_feature,
since: "1.84.0",
issue: to_nonzero(Some(132783)),
},
Feature {
name: sym::specialization,
since: "1.7.0",
issue: to_nonzero(Some(31844)),
},
Feature {
name: sym::static_align,
since: "1.91.0",
issue: to_nonzero(Some(146177)),
},
Feature {
name: sym::stmt_expr_attributes,
since: "1.6.0",
issue: to_nonzero(Some(15701)),
},
Feature {
name: sym::strict_provenance_lints,
since: "1.61.0",
issue: to_nonzero(Some(130351)),
},
Feature {
name: sym::super_let,
since: "1.88.0",
issue: to_nonzero(Some(139076)),
},
Feature {
name: sym::supertrait_item_shadowing,
since: "1.86.0",
issue: to_nonzero(Some(89151)),
},
Feature {
name: sym::target_feature_inline_always,
since: "1.91.0",
issue: to_nonzero(Some(145574)),
},
Feature {
name: sym::thread_local,
since: "1.0.0",
issue: to_nonzero(Some(29594)),
},
Feature {
name: sym::trait_alias,
since: "1.24.0",
issue: to_nonzero(Some(41517)),
},
Feature {
name: sym::transmute_generic_consts,
since: "1.70.0",
issue: to_nonzero(Some(109929)),
},
Feature {
name: sym::transparent_unions,
since: "1.37.0",
issue: to_nonzero(Some(60405)),
},
Feature {
name: sym::trivial_bounds,
since: "1.28.0",
issue: to_nonzero(Some(48214)),
},
Feature {
name: sym::try_blocks,
since: "1.29.0",
issue: to_nonzero(Some(31436)),
},
Feature {
name: sym::try_blocks_heterogeneous,
since: "1.94.0",
issue: to_nonzero(Some(149488)),
},
Feature {
name: sym::type_alias_impl_trait,
since: "1.38.0",
issue: to_nonzero(Some(63063)),
},
Feature {
name: sym::type_changing_struct_update,
since: "1.58.0",
issue: to_nonzero(Some(86555)),
},
Feature {
name: sym::unsafe_binders,
since: "1.85.0",
issue: to_nonzero(Some(130516)),
},
Feature {
name: sym::unsafe_fields,
since: "1.85.0",
issue: to_nonzero(Some(132922)),
},
Feature {
name: sym::unsized_const_params,
since: "1.82.0",
issue: to_nonzero(Some(95174)),
},
Feature {
name: sym::unsized_fn_params,
since: "1.49.0",
issue: to_nonzero(Some(48055)),
},
Feature {
name: sym::used_with_arg,
since: "1.60.0",
issue: to_nonzero(Some(93798)),
},
Feature {
name: sym::wasm_target_feature,
since: "1.30.0",
issue: to_nonzero(Some(150260)),
},
Feature {
name: sym::where_clause_attrs,
since: "1.87.0",
issue: to_nonzero(Some(115590)),
},
Feature {
name: sym::x86_amx_intrinsics,
since: "1.81.0",
issue: to_nonzero(Some(126622)),
},
Feature {
name: sym::x87_target_feature,
since: "1.85.0",
issue: to_nonzero(Some(150261)),
},
Feature {
name: sym::xop_target_feature,
since: "1.81.0",
issue: to_nonzero(Some(127208)),
},
Feature {
name: sym::yeet_expr,
since: "1.62.0",
issue: to_nonzero(Some(96373)),
},
Feature {
name: sym::yield_expr,
since: "1.87.0",
issue: to_nonzero(Some(43122)),
}];
impl Features {
pub fn abi_unadjusted(&self) -> bool { self.enabled(sym::abi_unadjusted) }
pub fn allocator_internals(&self) -> bool {
self.enabled(sym::allocator_internals)
}
pub fn allow_internal_unsafe(&self) -> bool {
self.enabled(sym::allow_internal_unsafe)
}
pub fn allow_internal_unstable(&self) -> bool {
self.enabled(sym::allow_internal_unstable)
}
pub fn anonymous_lifetime_in_impl_trait(&self) -> bool {
self.enabled(sym::anonymous_lifetime_in_impl_trait)
}
pub fn cfg_emscripten_wasm_eh(&self) -> bool {
self.enabled(sym::cfg_emscripten_wasm_eh)
}
pub fn cfg_target_has_reliable_f16_f128(&self) -> bool {
self.enabled(sym::cfg_target_has_reliable_f16_f128)
}
pub fn compiler_builtins(&self) -> bool {
self.enabled(sym::compiler_builtins)
}
pub fn custom_mir(&self) -> bool { self.enabled(sym::custom_mir) }
pub fn eii_internals(&self) -> bool { self.enabled(sym::eii_internals) }
pub fn field_representing_type_raw(&self) -> bool {
self.enabled(sym::field_representing_type_raw)
}
pub fn generic_assert(&self) -> bool { self.enabled(sym::generic_assert) }
pub fn intrinsics(&self) -> bool { self.enabled(sym::intrinsics) }
pub fn lang_items(&self) -> bool { self.enabled(sym::lang_items) }
pub fn link_cfg(&self) -> bool { self.enabled(sym::link_cfg) }
pub fn more_maybe_bounds(&self) -> bool {
self.enabled(sym::more_maybe_bounds)
}
pub fn negative_bounds(&self) -> bool {
self.enabled(sym::negative_bounds)
}
pub fn pattern_complexity_limit(&self) -> bool {
self.enabled(sym::pattern_complexity_limit)
}
pub fn prelude_import(&self) -> bool { self.enabled(sym::prelude_import) }
pub fn profiler_runtime(&self) -> bool {
self.enabled(sym::profiler_runtime)
}
pub fn rustc_attrs(&self) -> bool { self.enabled(sym::rustc_attrs) }
pub fn staged_api(&self) -> bool { self.enabled(sym::staged_api) }
pub fn test_unstable_lint(&self) -> bool {
self.enabled(sym::test_unstable_lint)
}
pub fn with_negative_coherence(&self) -> bool {
self.enabled(sym::with_negative_coherence)
}
pub fn abi_vectorcall(&self) -> bool { self.enabled(sym::abi_vectorcall) }
pub fn auto_traits(&self) -> bool { self.enabled(sym::auto_traits) }
pub fn box_patterns(&self) -> bool { self.enabled(sym::box_patterns) }
pub fn builtin_syntax(&self) -> bool { self.enabled(sym::builtin_syntax) }
pub fn doc_notable_trait(&self) -> bool {
self.enabled(sym::doc_notable_trait)
}
pub fn dropck_eyepatch(&self) -> bool {
self.enabled(sym::dropck_eyepatch)
}
pub fn fundamental(&self) -> bool { self.enabled(sym::fundamental) }
pub fn link_llvm_intrinsics(&self) -> bool {
self.enabled(sym::link_llvm_intrinsics)
}
pub fn linkage(&self) -> bool { self.enabled(sym::linkage) }
pub fn needs_panic_runtime(&self) -> bool {
self.enabled(sym::needs_panic_runtime)
}
pub fn panic_runtime(&self) -> bool { self.enabled(sym::panic_runtime) }
pub fn pattern_types(&self) -> bool { self.enabled(sym::pattern_types) }
pub fn rustc_private(&self) -> bool { self.enabled(sym::rustc_private) }
pub fn rustdoc_internals(&self) -> bool {
self.enabled(sym::rustdoc_internals)
}
pub fn rustdoc_missing_doc_code_examples(&self) -> bool {
self.enabled(sym::rustdoc_missing_doc_code_examples)
}
pub fn sized_hierarchy(&self) -> bool {
self.enabled(sym::sized_hierarchy)
}
pub fn structural_match(&self) -> bool {
self.enabled(sym::structural_match)
}
pub fn unboxed_closures(&self) -> bool {
self.enabled(sym::unboxed_closures)
}
pub fn unqualified_local_imports(&self) -> bool {
self.enabled(sym::unqualified_local_imports)
}
pub fn aarch64_unstable_target_feature(&self) -> bool {
self.enabled(sym::aarch64_unstable_target_feature)
}
pub fn aarch64_ver_target_feature(&self) -> bool {
self.enabled(sym::aarch64_ver_target_feature)
}
pub fn abi_avr_interrupt(&self) -> bool {
self.enabled(sym::abi_avr_interrupt)
}
pub fn abi_cmse_nonsecure_call(&self) -> bool {
self.enabled(sym::abi_cmse_nonsecure_call)
}
pub fn abi_custom(&self) -> bool { self.enabled(sym::abi_custom) }
pub fn abi_gpu_kernel(&self) -> bool { self.enabled(sym::abi_gpu_kernel) }
pub fn abi_msp430_interrupt(&self) -> bool {
self.enabled(sym::abi_msp430_interrupt)
}
pub fn abi_ptx(&self) -> bool { self.enabled(sym::abi_ptx) }
pub fn abi_riscv_interrupt(&self) -> bool {
self.enabled(sym::abi_riscv_interrupt)
}
pub fn abi_x86_interrupt(&self) -> bool {
self.enabled(sym::abi_x86_interrupt)
}
pub fn adt_const_params(&self) -> bool {
self.enabled(sym::adt_const_params)
}
pub fn alloc_error_handler(&self) -> bool {
self.enabled(sym::alloc_error_handler)
}
pub fn apx_target_feature(&self) -> bool {
self.enabled(sym::apx_target_feature)
}
pub fn arbitrary_self_types(&self) -> bool {
self.enabled(sym::arbitrary_self_types)
}
pub fn arbitrary_self_types_pointers(&self) -> bool {
self.enabled(sym::arbitrary_self_types_pointers)
}
pub fn arm_target_feature(&self) -> bool {
self.enabled(sym::arm_target_feature)
}
pub fn asm_experimental_arch(&self) -> bool {
self.enabled(sym::asm_experimental_arch)
}
pub fn asm_experimental_reg(&self) -> bool {
self.enabled(sym::asm_experimental_reg)
}
pub fn asm_goto_with_outputs(&self) -> bool {
self.enabled(sym::asm_goto_with_outputs)
}
pub fn asm_unwind(&self) -> bool { self.enabled(sym::asm_unwind) }
pub fn associated_type_defaults(&self) -> bool {
self.enabled(sym::associated_type_defaults)
}
pub fn async_drop(&self) -> bool { self.enabled(sym::async_drop) }
pub fn async_fn_in_dyn_trait(&self) -> bool {
self.enabled(sym::async_fn_in_dyn_trait)
}
pub fn async_fn_track_caller(&self) -> bool {
self.enabled(sym::async_fn_track_caller)
}
pub fn async_for_loop(&self) -> bool { self.enabled(sym::async_for_loop) }
pub fn async_trait_bounds(&self) -> bool {
self.enabled(sym::async_trait_bounds)
}
pub fn avr_target_feature(&self) -> bool {
self.enabled(sym::avr_target_feature)
}
pub fn avx10_target_feature(&self) -> bool {
self.enabled(sym::avx10_target_feature)
}
pub fn bpf_target_feature(&self) -> bool {
self.enabled(sym::bpf_target_feature)
}
pub fn c_variadic(&self) -> bool { self.enabled(sym::c_variadic) }
pub fn c_variadic_naked_functions(&self) -> bool {
self.enabled(sym::c_variadic_naked_functions)
}
pub fn cfg_contract_checks(&self) -> bool {
self.enabled(sym::cfg_contract_checks)
}
pub fn cfg_overflow_checks(&self) -> bool {
self.enabled(sym::cfg_overflow_checks)
}
pub fn cfg_relocation_model(&self) -> bool {
self.enabled(sym::cfg_relocation_model)
}
pub fn cfg_sanitize(&self) -> bool { self.enabled(sym::cfg_sanitize) }
pub fn cfg_sanitizer_cfi(&self) -> bool {
self.enabled(sym::cfg_sanitizer_cfi)
}
pub fn cfg_target_compact(&self) -> bool {
self.enabled(sym::cfg_target_compact)
}
pub fn cfg_target_has_atomic(&self) -> bool {
self.enabled(sym::cfg_target_has_atomic)
}
pub fn cfg_target_has_atomic_equal_alignment(&self) -> bool {
self.enabled(sym::cfg_target_has_atomic_equal_alignment)
}
pub fn cfg_target_thread_local(&self) -> bool {
self.enabled(sym::cfg_target_thread_local)
}
pub fn cfg_ub_checks(&self) -> bool { self.enabled(sym::cfg_ub_checks) }
pub fn cfg_version(&self) -> bool { self.enabled(sym::cfg_version) }
pub fn cfi_encoding(&self) -> bool { self.enabled(sym::cfi_encoding) }
pub fn closure_lifetime_binder(&self) -> bool {
self.enabled(sym::closure_lifetime_binder)
}
pub fn closure_track_caller(&self) -> bool {
self.enabled(sym::closure_track_caller)
}
pub fn cmse_nonsecure_entry(&self) -> bool {
self.enabled(sym::cmse_nonsecure_entry)
}
pub fn const_async_blocks(&self) -> bool {
self.enabled(sym::const_async_blocks)
}
pub fn const_block_items(&self) -> bool {
self.enabled(sym::const_block_items)
}
pub fn const_c_variadic(&self) -> bool {
self.enabled(sym::const_c_variadic)
}
pub fn const_closures(&self) -> bool { self.enabled(sym::const_closures) }
pub fn const_destruct(&self) -> bool { self.enabled(sym::const_destruct) }
pub fn const_for(&self) -> bool { self.enabled(sym::const_for) }
pub fn const_precise_live_drops(&self) -> bool {
self.enabled(sym::const_precise_live_drops)
}
pub fn const_trait_impl(&self) -> bool {
self.enabled(sym::const_trait_impl)
}
pub fn const_try(&self) -> bool { self.enabled(sym::const_try) }
pub fn contracts(&self) -> bool { self.enabled(sym::contracts) }
pub fn contracts_internals(&self) -> bool {
self.enabled(sym::contracts_internals)
}
pub fn coroutine_clone(&self) -> bool {
self.enabled(sym::coroutine_clone)
}
pub fn coroutines(&self) -> bool { self.enabled(sym::coroutines) }
pub fn coverage_attribute(&self) -> bool {
self.enabled(sym::coverage_attribute)
}
pub fn csky_target_feature(&self) -> bool {
self.enabled(sym::csky_target_feature)
}
pub fn custom_inner_attributes(&self) -> bool {
self.enabled(sym::custom_inner_attributes)
}
pub fn custom_test_frameworks(&self) -> bool {
self.enabled(sym::custom_test_frameworks)
}
pub fn decl_macro(&self) -> bool { self.enabled(sym::decl_macro) }
pub fn default_field_values(&self) -> bool {
self.enabled(sym::default_field_values)
}
pub fn deprecated_suggestion(&self) -> bool {
self.enabled(sym::deprecated_suggestion)
}
pub fn deref_patterns(&self) -> bool { self.enabled(sym::deref_patterns) }
pub fn derive_from(&self) -> bool { self.enabled(sym::derive_from) }
pub fn diagnostic_on_const(&self) -> bool {
self.enabled(sym::diagnostic_on_const)
}
pub fn doc_cfg(&self) -> bool { self.enabled(sym::doc_cfg) }
pub fn doc_masked(&self) -> bool { self.enabled(sym::doc_masked) }
pub fn effective_target_features(&self) -> bool {
self.enabled(sym::effective_target_features)
}
pub fn ergonomic_clones(&self) -> bool {
self.enabled(sym::ergonomic_clones)
}
pub fn ermsb_target_feature(&self) -> bool {
self.enabled(sym::ermsb_target_feature)
}
pub fn exhaustive_patterns(&self) -> bool {
self.enabled(sym::exhaustive_patterns)
}
pub fn explicit_extern_abis(&self) -> bool {
self.enabled(sym::explicit_extern_abis)
}
pub fn explicit_tail_calls(&self) -> bool {
self.enabled(sym::explicit_tail_calls)
}
pub fn export_stable(&self) -> bool { self.enabled(sym::export_stable) }
pub fn extern_item_impls(&self) -> bool {
self.enabled(sym::extern_item_impls)
}
pub fn extern_types(&self) -> bool { self.enabled(sym::extern_types) }
pub fn f128(&self) -> bool { self.enabled(sym::f128) }
pub fn f16(&self) -> bool { self.enabled(sym::f16) }
pub fn ffi_const(&self) -> bool { self.enabled(sym::ffi_const) }
pub fn ffi_pure(&self) -> bool { self.enabled(sym::ffi_pure) }
pub fn field_projections(&self) -> bool {
self.enabled(sym::field_projections)
}
pub fn final_associated_functions(&self) -> bool {
self.enabled(sym::final_associated_functions)
}
pub fn fmt_debug(&self) -> bool { self.enabled(sym::fmt_debug) }
pub fn fn_align(&self) -> bool { self.enabled(sym::fn_align) }
pub fn fn_delegation(&self) -> bool { self.enabled(sym::fn_delegation) }
pub fn freeze_impls(&self) -> bool { self.enabled(sym::freeze_impls) }
pub fn frontmatter(&self) -> bool { self.enabled(sym::frontmatter) }
pub fn gen_blocks(&self) -> bool { self.enabled(sym::gen_blocks) }
pub fn generic_const_exprs(&self) -> bool {
self.enabled(sym::generic_const_exprs)
}
pub fn generic_const_items(&self) -> bool {
self.enabled(sym::generic_const_items)
}
pub fn generic_const_parameter_types(&self) -> bool {
self.enabled(sym::generic_const_parameter_types)
}
pub fn generic_pattern_types(&self) -> bool {
self.enabled(sym::generic_pattern_types)
}
pub fn global_registration(&self) -> bool {
self.enabled(sym::global_registration)
}
pub fn guard_patterns(&self) -> bool { self.enabled(sym::guard_patterns) }
pub fn half_open_range_patterns_in_slices(&self) -> bool {
self.enabled(sym::half_open_range_patterns_in_slices)
}
pub fn hexagon_target_feature(&self) -> bool {
self.enabled(sym::hexagon_target_feature)
}
pub fn impl_restriction(&self) -> bool {
self.enabled(sym::impl_restriction)
}
pub fn impl_trait_in_assoc_type(&self) -> bool {
self.enabled(sym::impl_trait_in_assoc_type)
}
pub fn impl_trait_in_bindings(&self) -> bool {
self.enabled(sym::impl_trait_in_bindings)
}
pub fn impl_trait_in_fn_trait_return(&self) -> bool {
self.enabled(sym::impl_trait_in_fn_trait_return)
}
pub fn import_trait_associated_functions(&self) -> bool {
self.enabled(sym::import_trait_associated_functions)
}
pub fn inherent_associated_types(&self) -> bool {
self.enabled(sym::inherent_associated_types)
}
pub fn intra_doc_pointers(&self) -> bool {
self.enabled(sym::intra_doc_pointers)
}
pub fn lahfsahf_target_feature(&self) -> bool {
self.enabled(sym::lahfsahf_target_feature)
}
pub fn large_assignments(&self) -> bool {
self.enabled(sym::large_assignments)
}
pub fn lazy_type_alias(&self) -> bool {
self.enabled(sym::lazy_type_alias)
}
pub fn link_arg_attribute(&self) -> bool {
self.enabled(sym::link_arg_attribute)
}
pub fn loongarch_target_feature(&self) -> bool {
self.enabled(sym::loongarch_target_feature)
}
pub fn loop_match(&self) -> bool { self.enabled(sym::loop_match) }
pub fn m68k_target_feature(&self) -> bool {
self.enabled(sym::m68k_target_feature)
}
pub fn macro_attr(&self) -> bool { self.enabled(sym::macro_attr) }
pub fn macro_derive(&self) -> bool { self.enabled(sym::macro_derive) }
pub fn macro_metavar_expr(&self) -> bool {
self.enabled(sym::macro_metavar_expr)
}
pub fn macro_metavar_expr_concat(&self) -> bool {
self.enabled(sym::macro_metavar_expr_concat)
}
pub fn marker_trait_attr(&self) -> bool {
self.enabled(sym::marker_trait_attr)
}
pub fn mgca_type_const_syntax(&self) -> bool {
self.enabled(sym::mgca_type_const_syntax)
}
pub fn min_generic_const_args(&self) -> bool {
self.enabled(sym::min_generic_const_args)
}
pub fn min_specialization(&self) -> bool {
self.enabled(sym::min_specialization)
}
pub fn mips_target_feature(&self) -> bool {
self.enabled(sym::mips_target_feature)
}
pub fn more_qualified_paths(&self) -> bool {
self.enabled(sym::more_qualified_paths)
}
pub fn movrs_target_feature(&self) -> bool {
self.enabled(sym::movrs_target_feature)
}
pub fn multiple_supertrait_upcastable(&self) -> bool {
self.enabled(sym::multiple_supertrait_upcastable)
}
pub fn must_not_suspend(&self) -> bool {
self.enabled(sym::must_not_suspend)
}
pub fn mut_ref(&self) -> bool { self.enabled(sym::mut_ref) }
pub fn naked_functions_rustic_abi(&self) -> bool {
self.enabled(sym::naked_functions_rustic_abi)
}
pub fn naked_functions_target_feature(&self) -> bool {
self.enabled(sym::naked_functions_target_feature)
}
pub fn native_link_modifiers_as_needed(&self) -> bool {
self.enabled(sym::native_link_modifiers_as_needed)
}
pub fn negative_impls(&self) -> bool { self.enabled(sym::negative_impls) }
pub fn never_patterns(&self) -> bool { self.enabled(sym::never_patterns) }
pub fn never_type(&self) -> bool { self.enabled(sym::never_type) }
pub fn new_range(&self) -> bool { self.enabled(sym::new_range) }
pub fn no_core(&self) -> bool { self.enabled(sym::no_core) }
pub fn non_exhaustive_omitted_patterns_lint(&self) -> bool {
self.enabled(sym::non_exhaustive_omitted_patterns_lint)
}
pub fn non_lifetime_binders(&self) -> bool {
self.enabled(sym::non_lifetime_binders)
}
pub fn nvptx_target_feature(&self) -> bool {
self.enabled(sym::nvptx_target_feature)
}
pub fn offset_of_enum(&self) -> bool { self.enabled(sym::offset_of_enum) }
pub fn offset_of_slice(&self) -> bool {
self.enabled(sym::offset_of_slice)
}
pub fn opaque_generic_const_args(&self) -> bool {
self.enabled(sym::opaque_generic_const_args)
}
pub fn optimize_attribute(&self) -> bool {
self.enabled(sym::optimize_attribute)
}
pub fn patchable_function_entry(&self) -> bool {
self.enabled(sym::patchable_function_entry)
}
pub fn pin_ergonomics(&self) -> bool { self.enabled(sym::pin_ergonomics) }
pub fn postfix_match(&self) -> bool { self.enabled(sym::postfix_match) }
pub fn powerpc_target_feature(&self) -> bool {
self.enabled(sym::powerpc_target_feature)
}
pub fn prfchw_target_feature(&self) -> bool {
self.enabled(sym::prfchw_target_feature)
}
pub fn proc_macro_hygiene(&self) -> bool {
self.enabled(sym::proc_macro_hygiene)
}
pub fn raw_dylib_elf(&self) -> bool { self.enabled(sym::raw_dylib_elf) }
pub fn reborrow(&self) -> bool { self.enabled(sym::reborrow) }
pub fn ref_pat_eat_one_layer_2024(&self) -> bool {
self.enabled(sym::ref_pat_eat_one_layer_2024)
}
pub fn ref_pat_eat_one_layer_2024_structural(&self) -> bool {
self.enabled(sym::ref_pat_eat_one_layer_2024_structural)
}
pub fn register_tool(&self) -> bool { self.enabled(sym::register_tool) }
pub fn repr_simd(&self) -> bool { self.enabled(sym::repr_simd) }
pub fn return_type_notation(&self) -> bool {
self.enabled(sym::return_type_notation)
}
pub fn riscv_target_feature(&self) -> bool {
self.enabled(sym::riscv_target_feature)
}
pub fn rtm_target_feature(&self) -> bool {
self.enabled(sym::rtm_target_feature)
}
pub fn rust_cold_cc(&self) -> bool { self.enabled(sym::rust_cold_cc) }
pub fn rust_preserve_none_cc(&self) -> bool {
self.enabled(sym::rust_preserve_none_cc)
}
pub fn s390x_target_feature(&self) -> bool {
self.enabled(sym::s390x_target_feature)
}
pub fn sanitize(&self) -> bool { self.enabled(sym::sanitize) }
pub fn simd_ffi(&self) -> bool { self.enabled(sym::simd_ffi) }
pub fn sparc_target_feature(&self) -> bool {
self.enabled(sym::sparc_target_feature)
}
pub fn specialization(&self) -> bool { self.enabled(sym::specialization) }
pub fn static_align(&self) -> bool { self.enabled(sym::static_align) }
pub fn stmt_expr_attributes(&self) -> bool {
self.enabled(sym::stmt_expr_attributes)
}
pub fn strict_provenance_lints(&self) -> bool {
self.enabled(sym::strict_provenance_lints)
}
pub fn super_let(&self) -> bool { self.enabled(sym::super_let) }
pub fn supertrait_item_shadowing(&self) -> bool {
self.enabled(sym::supertrait_item_shadowing)
}
pub fn target_feature_inline_always(&self) -> bool {
self.enabled(sym::target_feature_inline_always)
}
pub fn thread_local(&self) -> bool { self.enabled(sym::thread_local) }
pub fn trait_alias(&self) -> bool { self.enabled(sym::trait_alias) }
pub fn transmute_generic_consts(&self) -> bool {
self.enabled(sym::transmute_generic_consts)
}
pub fn transparent_unions(&self) -> bool {
self.enabled(sym::transparent_unions)
}
pub fn trivial_bounds(&self) -> bool { self.enabled(sym::trivial_bounds) }
pub fn try_blocks(&self) -> bool { self.enabled(sym::try_blocks) }
pub fn try_blocks_heterogeneous(&self) -> bool {
self.enabled(sym::try_blocks_heterogeneous)
}
pub fn type_alias_impl_trait(&self) -> bool {
self.enabled(sym::type_alias_impl_trait)
}
pub fn type_changing_struct_update(&self) -> bool {
self.enabled(sym::type_changing_struct_update)
}
pub fn unsafe_binders(&self) -> bool { self.enabled(sym::unsafe_binders) }
pub fn unsafe_fields(&self) -> bool { self.enabled(sym::unsafe_fields) }
pub fn unsized_const_params(&self) -> bool {
self.enabled(sym::unsized_const_params)
}
pub fn unsized_fn_params(&self) -> bool {
self.enabled(sym::unsized_fn_params)
}
pub fn used_with_arg(&self) -> bool { self.enabled(sym::used_with_arg) }
pub fn wasm_target_feature(&self) -> bool {
self.enabled(sym::wasm_target_feature)
}
pub fn where_clause_attrs(&self) -> bool {
self.enabled(sym::where_clause_attrs)
}
pub fn x86_amx_intrinsics(&self) -> bool {
self.enabled(sym::x86_amx_intrinsics)
}
pub fn x87_target_feature(&self) -> bool {
self.enabled(sym::x87_target_feature)
}
pub fn xop_target_feature(&self) -> bool {
self.enabled(sym::xop_target_feature)
}
pub fn yeet_expr(&self) -> bool { self.enabled(sym::yeet_expr) }
pub fn yield_expr(&self) -> bool { self.enabled(sym::yield_expr) }
pub fn incomplete(&self, feature: Symbol) -> bool {
match feature {
sym::abi_unadjusted =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::allocator_internals =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::allow_internal_unsafe =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::allow_internal_unstable =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::anonymous_lifetime_in_impl_trait =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_emscripten_wasm_eh =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::cfg_target_has_reliable_f16_f128 =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::compiler_builtins =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::custom_mir =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::eii_internals =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::field_representing_type_raw =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::generic_assert =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::intrinsics =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::lang_items =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::link_cfg =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::more_maybe_bounds =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::negative_bounds =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::pattern_complexity_limit =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::prelude_import =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::profiler_runtime =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::rustc_attrs =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::staged_api =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::test_unstable_lint =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::with_negative_coherence =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_vectorcall =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::auto_traits =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::box_patterns =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::builtin_syntax =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::doc_notable_trait =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::dropck_eyepatch =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::fundamental =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::link_llvm_intrinsics =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::linkage =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::needs_panic_runtime =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::panic_runtime =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::pattern_types =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::rustc_private =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::rustdoc_internals =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::rustdoc_missing_doc_code_examples =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::sized_hierarchy =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::structural_match =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::unboxed_closures =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::unqualified_local_imports =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::aarch64_unstable_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::aarch64_ver_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_avr_interrupt =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_cmse_nonsecure_call =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_custom =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_gpu_kernel =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_msp430_interrupt =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_ptx =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_riscv_interrupt =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::abi_x86_interrupt =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::adt_const_params =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::alloc_error_handler =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::apx_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::arbitrary_self_types =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::arbitrary_self_types_pointers =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::arm_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::asm_experimental_arch =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::asm_experimental_reg =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::asm_goto_with_outputs =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::asm_unwind =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::associated_type_defaults =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::async_drop =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::async_fn_in_dyn_trait =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::async_fn_track_caller =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::async_for_loop =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::async_trait_bounds =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::avr_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::avx10_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::bpf_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::c_variadic =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::c_variadic_naked_functions =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_contract_checks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_overflow_checks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_relocation_model =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_sanitize =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_sanitizer_cfi =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_target_compact =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_target_has_atomic =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_target_has_atomic_equal_alignment =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_target_thread_local =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_ub_checks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfg_version =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cfi_encoding =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::closure_lifetime_binder =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::closure_track_caller =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::cmse_nonsecure_entry =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_async_blocks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_block_items =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_c_variadic =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_closures =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::const_destruct =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_for =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_precise_live_drops =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_trait_impl =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::const_try =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::contracts =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::contracts_internals =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::coroutine_clone =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::coroutines =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::coverage_attribute =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::csky_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::custom_inner_attributes =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::custom_test_frameworks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::decl_macro =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::default_field_values =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::deprecated_suggestion =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::deref_patterns =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::derive_from =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::diagnostic_on_const =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::doc_cfg =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::doc_masked =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::effective_target_features =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::ergonomic_clones =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::ermsb_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::exhaustive_patterns =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::explicit_extern_abis =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::explicit_tail_calls =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::export_stable =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::extern_item_impls =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::extern_types =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::f128 => FeatureStatus::Default == FeatureStatus::Incomplete,
sym::f16 => FeatureStatus::Default == FeatureStatus::Incomplete,
sym::ffi_const =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::ffi_pure =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::field_projections =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::final_associated_functions =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::fmt_debug =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::fn_align =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::fn_delegation =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::freeze_impls =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::frontmatter =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::gen_blocks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::generic_const_exprs =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::generic_const_items =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::generic_const_parameter_types =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::generic_pattern_types =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::global_registration =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::guard_patterns =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::half_open_range_patterns_in_slices =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::hexagon_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::impl_restriction =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::impl_trait_in_assoc_type =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::impl_trait_in_bindings =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::impl_trait_in_fn_trait_return =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::import_trait_associated_functions =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::inherent_associated_types =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::intra_doc_pointers =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::lahfsahf_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::large_assignments =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::lazy_type_alias =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::link_arg_attribute =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::loongarch_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::loop_match =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::m68k_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::macro_attr =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::macro_derive =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::macro_metavar_expr =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::macro_metavar_expr_concat =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::marker_trait_attr =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::mgca_type_const_syntax =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::min_generic_const_args =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::min_specialization =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::mips_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::more_qualified_paths =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::movrs_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::multiple_supertrait_upcastable =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::must_not_suspend =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::mut_ref =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::naked_functions_rustic_abi =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::naked_functions_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::native_link_modifiers_as_needed =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::negative_impls =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::never_patterns =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::never_type =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::new_range =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::no_core =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::non_exhaustive_omitted_patterns_lint =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::non_lifetime_binders =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::nvptx_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::offset_of_enum =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::offset_of_slice =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::opaque_generic_const_args =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::optimize_attribute =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::patchable_function_entry =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::pin_ergonomics =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::postfix_match =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::powerpc_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::prfchw_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::proc_macro_hygiene =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::raw_dylib_elf =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::reborrow =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::ref_pat_eat_one_layer_2024 =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::ref_pat_eat_one_layer_2024_structural =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::register_tool =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::repr_simd =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::return_type_notation =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::riscv_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::rtm_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::rust_cold_cc =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::rust_preserve_none_cc =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::s390x_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::sanitize =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::simd_ffi =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::sparc_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::specialization =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::static_align =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::stmt_expr_attributes =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::strict_provenance_lints =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::super_let =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::supertrait_item_shadowing =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::target_feature_inline_always =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::thread_local =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::trait_alias =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::transmute_generic_consts =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::transparent_unions =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::trivial_bounds =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::try_blocks =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::try_blocks_heterogeneous =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::type_alias_impl_trait =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::type_changing_struct_update =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::unsafe_binders =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::unsafe_fields =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::unsized_const_params =>
FeatureStatus::Incomplete == FeatureStatus::Incomplete,
sym::unsized_fn_params =>
FeatureStatus::Internal == FeatureStatus::Incomplete,
sym::used_with_arg =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::wasm_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::where_clause_attrs =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::x86_amx_intrinsics =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::x87_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::xop_target_feature =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::yeet_expr =>
FeatureStatus::Default == FeatureStatus::Incomplete,
sym::yield_expr =>
FeatureStatus::Default == FeatureStatus::Incomplete,
_ if self.enabled_features.contains(&feature) => { false }
_ => {
::core::panicking::panic_fmt(format_args!("`{0}` was not listed in `declare_features`",
feature));
}
}
}
pub fn internal(&self, feature: Symbol) -> bool {
match feature {
sym::abi_unadjusted =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::allocator_internals =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::allow_internal_unsafe =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::allow_internal_unstable =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::anonymous_lifetime_in_impl_trait =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_emscripten_wasm_eh =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::cfg_target_has_reliable_f16_f128 =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::compiler_builtins =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::custom_mir =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::eii_internals =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::field_representing_type_raw =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::generic_assert =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::intrinsics =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::lang_items =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::link_cfg =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::more_maybe_bounds =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::negative_bounds =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::pattern_complexity_limit =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::prelude_import =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::profiler_runtime =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::rustc_attrs =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::staged_api =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::test_unstable_lint =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::with_negative_coherence =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_vectorcall =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::auto_traits =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::box_patterns =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::builtin_syntax =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::doc_notable_trait =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::dropck_eyepatch =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::fundamental =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::link_llvm_intrinsics =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::linkage => FeatureStatus::Default == FeatureStatus::Internal,
sym::needs_panic_runtime =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::panic_runtime =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::pattern_types =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::rustc_private =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::rustdoc_internals =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::rustdoc_missing_doc_code_examples =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::sized_hierarchy =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::structural_match =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::unboxed_closures =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::unqualified_local_imports =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::aarch64_unstable_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::aarch64_ver_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_avr_interrupt =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_cmse_nonsecure_call =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_custom =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_gpu_kernel =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_msp430_interrupt =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_ptx => FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_riscv_interrupt =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::abi_x86_interrupt =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::adt_const_params =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::alloc_error_handler =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::apx_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::arbitrary_self_types =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::arbitrary_self_types_pointers =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::arm_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::asm_experimental_arch =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::asm_experimental_reg =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::asm_goto_with_outputs =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::asm_unwind =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::associated_type_defaults =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::async_drop =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::async_fn_in_dyn_trait =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::async_fn_track_caller =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::async_for_loop =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::async_trait_bounds =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::avr_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::avx10_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::bpf_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::c_variadic =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::c_variadic_naked_functions =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_contract_checks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_overflow_checks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_relocation_model =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_sanitize =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_sanitizer_cfi =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_target_compact =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_target_has_atomic =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_target_has_atomic_equal_alignment =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_target_thread_local =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_ub_checks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfg_version =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cfi_encoding =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::closure_lifetime_binder =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::closure_track_caller =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::cmse_nonsecure_entry =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_async_blocks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_block_items =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_c_variadic =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_closures =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::const_destruct =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_for =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_precise_live_drops =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_trait_impl =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::const_try =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::contracts =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::contracts_internals =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::coroutine_clone =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::coroutines =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::coverage_attribute =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::csky_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::custom_inner_attributes =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::custom_test_frameworks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::decl_macro =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::default_field_values =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::deprecated_suggestion =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::deref_patterns =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::derive_from =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::diagnostic_on_const =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::doc_cfg => FeatureStatus::Default == FeatureStatus::Internal,
sym::doc_masked =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::effective_target_features =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::ergonomic_clones =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::ermsb_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::exhaustive_patterns =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::explicit_extern_abis =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::explicit_tail_calls =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::export_stable =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::extern_item_impls =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::extern_types =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::f128 => FeatureStatus::Default == FeatureStatus::Internal,
sym::f16 => FeatureStatus::Default == FeatureStatus::Internal,
sym::ffi_const =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::ffi_pure =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::field_projections =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::final_associated_functions =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::fmt_debug =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::fn_align =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::fn_delegation =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::freeze_impls =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::frontmatter =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::gen_blocks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::generic_const_exprs =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::generic_const_items =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::generic_const_parameter_types =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::generic_pattern_types =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::global_registration =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::guard_patterns =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::half_open_range_patterns_in_slices =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::hexagon_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::impl_restriction =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::impl_trait_in_assoc_type =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::impl_trait_in_bindings =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::impl_trait_in_fn_trait_return =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::import_trait_associated_functions =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::inherent_associated_types =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::intra_doc_pointers =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::lahfsahf_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::large_assignments =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::lazy_type_alias =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::link_arg_attribute =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::loongarch_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::loop_match =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::m68k_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::macro_attr =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::macro_derive =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::macro_metavar_expr =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::macro_metavar_expr_concat =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::marker_trait_attr =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::mgca_type_const_syntax =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::min_generic_const_args =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::min_specialization =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::mips_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::more_qualified_paths =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::movrs_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::multiple_supertrait_upcastable =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::must_not_suspend =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::mut_ref =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::naked_functions_rustic_abi =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::naked_functions_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::native_link_modifiers_as_needed =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::negative_impls =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::never_patterns =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::never_type =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::new_range =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::no_core => FeatureStatus::Default == FeatureStatus::Internal,
sym::non_exhaustive_omitted_patterns_lint =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::non_lifetime_binders =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::nvptx_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::offset_of_enum =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::offset_of_slice =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::opaque_generic_const_args =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::optimize_attribute =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::patchable_function_entry =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::pin_ergonomics =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::postfix_match =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::powerpc_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::prfchw_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::proc_macro_hygiene =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::raw_dylib_elf =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::reborrow =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::ref_pat_eat_one_layer_2024 =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::ref_pat_eat_one_layer_2024_structural =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::register_tool =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::repr_simd =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::return_type_notation =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::riscv_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::rtm_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::rust_cold_cc =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::rust_preserve_none_cc =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::s390x_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::sanitize =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::simd_ffi =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::sparc_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::specialization =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::static_align =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::stmt_expr_attributes =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::strict_provenance_lints =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::super_let =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::supertrait_item_shadowing =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::target_feature_inline_always =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::thread_local =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::trait_alias =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::transmute_generic_consts =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::transparent_unions =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::trivial_bounds =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::try_blocks =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::try_blocks_heterogeneous =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::type_alias_impl_trait =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::type_changing_struct_update =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::unsafe_binders =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::unsafe_fields =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::unsized_const_params =>
FeatureStatus::Incomplete == FeatureStatus::Internal,
sym::unsized_fn_params =>
FeatureStatus::Internal == FeatureStatus::Internal,
sym::used_with_arg =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::wasm_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::where_clause_attrs =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::x86_amx_intrinsics =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::x87_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::xop_target_feature =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::yeet_expr =>
FeatureStatus::Default == FeatureStatus::Internal,
sym::yield_expr =>
FeatureStatus::Default == FeatureStatus::Internal,
_ if self.enabled_features.contains(&feature) => {
let name = feature.as_str();
name == "core_intrinsics" || name.ends_with("_internal") ||
name.ends_with("_internals")
}
_ => {
::core::panicking::panic_fmt(format_args!("`{0}` was not listed in `declare_features`",
feature));
}
}
}
}declare_features! (
205 (internal, abi_unadjusted, "1.16.0", None),
212 (internal, allocator_internals, "1.20.0", None),
214 (internal, allow_internal_unsafe, "1.0.0", None),
219 (internal, allow_internal_unstable, "1.0.0", None),
224 (unstable, anonymous_lifetime_in_impl_trait, "1.63.0", None),
226 (internal, cfg_emscripten_wasm_eh, "1.86.0", None),
228 (internal, cfg_target_has_reliable_f16_f128, "1.88.0", None),
230 (internal, compiler_builtins, "1.13.0", None),
232 (internal, custom_mir, "1.65.0", None),
234 (internal, eii_internals, "1.94.0", None),
236 (internal, field_representing_type_raw, "CURRENT_RUSTC_VERSION", None),
238 (unstable, generic_assert, "1.63.0", None),
240 (internal, intrinsics, "1.0.0", None),
242 (internal, lang_items, "1.0.0", None),
244 (internal, link_cfg, "1.14.0", None),
246 (internal, more_maybe_bounds, "1.82.0", None),
248 (internal, negative_bounds, "1.71.0", None),
250 (internal, pattern_complexity_limit, "1.78.0", None),
252 (internal, prelude_import, "1.2.0", None),
254 (internal, profiler_runtime, "1.18.0", None),
256 (internal, rustc_attrs, "1.0.0", None),
258 (internal, staged_api, "1.0.0", None),
260 (internal, test_unstable_lint, "1.60.0", None),
262 (unstable, with_negative_coherence, "1.60.0", None),
265 (unstable, abi_vectorcall, "1.7.0", Some(124485)),
280 (unstable, auto_traits, "1.50.0", Some(13231)),
283 (unstable, box_patterns, "1.0.0", Some(29641)),
285 (internal, builtin_syntax, "1.71.0", Some(110680)),
287 (unstable, doc_notable_trait, "1.52.0", Some(45040)),
290 (unstable, dropck_eyepatch, "1.10.0", Some(34761)),
292 (unstable, fundamental, "1.0.0", Some(29635)),
294 (internal, link_llvm_intrinsics, "1.0.0", Some(29602)),
296 (unstable, linkage, "1.0.0", Some(29603)),
298 (internal, needs_panic_runtime, "1.10.0", Some(32837)),
300 (internal, panic_runtime, "1.10.0", Some(32837)),
302 (internal, pattern_types, "1.79.0", Some(123646)),
304 (unstable, rustc_private, "1.0.0", Some(27812)),
306 (internal, rustdoc_internals, "1.58.0", Some(90418)),
308 (unstable, rustdoc_missing_doc_code_examples, "1.31.0", Some(101730)),
310 (unstable, sized_hierarchy, "1.89.0", Some(144404)),
312 (unstable, structural_match, "1.8.0", Some(31434)),
316 (unstable, unboxed_closures, "1.0.0", Some(29625)),
318 (unstable, unqualified_local_imports, "1.83.0", Some(138299)),
320 (unstable, aarch64_unstable_target_feature, "1.82.0", Some(150244)),
334 (unstable, aarch64_ver_target_feature, "1.27.0", Some(150245)),
336 (unstable, abi_avr_interrupt, "1.45.0", Some(69664)),
338 (unstable, abi_cmse_nonsecure_call, "1.90.0", Some(81391)),
340 (unstable, abi_custom, "1.89.0", Some(140829)),
342 (unstable, abi_gpu_kernel, "1.86.0", Some(135467)),
344 (unstable, abi_msp430_interrupt, "1.16.0", Some(38487)),
346 (unstable, abi_ptx, "1.15.0", Some(38788)),
348 (unstable, abi_riscv_interrupt, "1.73.0", Some(111889)),
350 (unstable, abi_x86_interrupt, "1.17.0", Some(40180)),
352 (unstable, adt_const_params, "1.56.0", Some(95174)),
354 (unstable, alloc_error_handler, "1.29.0", Some(51540)),
356 (unstable, apx_target_feature, "1.88.0", Some(139284)),
358 (unstable, arbitrary_self_types, "1.23.0", Some(44874)),
360 (unstable, arbitrary_self_types_pointers, "1.83.0", Some(44874)),
362 (unstable, arm_target_feature, "1.27.0", Some(150246)),
364 (unstable, asm_experimental_arch, "1.58.0", Some(93335)),
366 (unstable, asm_experimental_reg, "1.85.0", Some(133416)),
368 (unstable, asm_goto_with_outputs, "1.85.0", Some(119364)),
370 (unstable, asm_unwind, "1.58.0", Some(93334)),
372 (unstable, associated_type_defaults, "1.2.0", Some(29661)),
374 (incomplete, async_drop, "1.88.0", Some(126482)),
376 (incomplete, async_fn_in_dyn_trait, "1.85.0", Some(133119)),
378 (unstable, async_fn_track_caller, "1.73.0", Some(110011)),
380 (unstable, async_for_loop, "1.77.0", Some(118898)),
382 (unstable, async_trait_bounds, "1.85.0", Some(62290)),
384 (unstable, avr_target_feature, "1.95.0", Some(146889)),
386 (unstable, avx10_target_feature, "1.88.0", Some(138843)),
388 (unstable, bpf_target_feature, "1.54.0", Some(150247)),
390 (unstable, c_variadic, "1.34.0", Some(44930)),
392 (unstable, c_variadic_naked_functions, "1.93.0", Some(148767)),
395 (unstable, cfg_contract_checks, "1.86.0", Some(128044)),
397 (unstable, cfg_overflow_checks, "1.71.0", Some(111466)),
399 (unstable, cfg_relocation_model, "1.73.0", Some(114929)),
401 (unstable, cfg_sanitize, "1.41.0", Some(39699)),
403 (unstable, cfg_sanitizer_cfi, "1.77.0", Some(89653)),
405 (unstable, cfg_target_compact, "1.63.0", Some(96901)),
407 (unstable, cfg_target_has_atomic, "1.60.0", Some(94039)),
409 (unstable, cfg_target_has_atomic_equal_alignment, "1.60.0", Some(93822)),
411 (unstable, cfg_target_thread_local, "1.7.0", Some(29594)),
413 (unstable, cfg_ub_checks, "1.79.0", Some(123499)),
415 (unstable, cfg_version, "1.45.0", Some(64796)),
417 (unstable, cfi_encoding, "1.71.0", Some(89653)),
419 (unstable, closure_lifetime_binder, "1.64.0", Some(97362)),
421 (unstable, closure_track_caller, "1.57.0", Some(87417)),
423 (unstable, cmse_nonsecure_entry, "1.48.0", Some(75835)),
425 (unstable, const_async_blocks, "1.53.0", Some(85368)),
427 (unstable, const_block_items, "1.95.0", Some(149226)),
429 (unstable, const_c_variadic, "1.95.0", Some(151787)),
431 (incomplete, const_closures, "1.68.0", Some(106003)),
433 (unstable, const_destruct, "1.85.0", Some(133214)),
435 (unstable, const_for, "1.56.0", Some(87575)),
437 (unstable, const_precise_live_drops, "1.46.0", Some(73255)),
439 (unstable, const_trait_impl, "1.42.0", Some(143874)),
441 (unstable, const_try, "1.56.0", Some(74935)),
443 (incomplete, contracts, "1.86.0", Some(128044)),
445 (internal, contracts_internals, "1.86.0", Some(128044)),
447 (unstable, coroutine_clone, "1.65.0", Some(95360)),
449 (unstable, coroutines, "1.21.0", Some(43122)),
451 (unstable, coverage_attribute, "1.74.0", Some(84605)),
454 (unstable, csky_target_feature, "1.73.0", Some(150248)),
456 (unstable, custom_inner_attributes, "1.30.0", Some(54726)),
458 (unstable, custom_test_frameworks, "1.30.0", Some(50297)),
460 (unstable, decl_macro, "1.17.0", Some(39412)),
462 (unstable, default_field_values, "1.85.0", Some(132162)),
465 (unstable, deprecated_suggestion, "1.61.0", Some(94785)),
467 (unstable, deref_patterns, "1.79.0", Some(87121)),
469 (unstable, derive_from, "1.91.0", Some(144889)),
471 (unstable, diagnostic_on_const, "1.93.0", Some(143874)),
473 (unstable, doc_cfg, "1.21.0", Some(43781)),
475 (unstable, doc_masked, "1.21.0", Some(44027)),
477 (incomplete, effective_target_features, "1.91.0", Some(143352)),
479 (incomplete, ergonomic_clones, "1.87.0", Some(132290)),
481 (unstable, ermsb_target_feature, "1.49.0", Some(150249)),
483 (unstable, exhaustive_patterns, "1.13.0", Some(51085)),
485 (unstable, explicit_extern_abis, "1.88.0", Some(134986)),
487 (incomplete, explicit_tail_calls, "1.72.0", Some(112788)),
489 (incomplete, export_stable, "1.88.0", Some(139939)),
491 (unstable, extern_item_impls, "1.94.0", Some(125418)),
493 (unstable, extern_types, "1.23.0", Some(43467)),
495 (unstable, f128, "1.78.0", Some(116909)),
497 (unstable, f16, "1.78.0", Some(116909)),
499 (unstable, ffi_const, "1.45.0", Some(58328)),
501 (unstable, ffi_pure, "1.45.0", Some(58329)),
503 (incomplete, field_projections, "CURRENT_RUSTC_VERSION", Some(145383)),
505 (unstable, final_associated_functions, "1.95.0", Some(131179)),
507 (unstable, fmt_debug, "1.82.0", Some(129709)),
509 (unstable, fn_align, "1.53.0", Some(82232)),
511 (incomplete, fn_delegation, "1.76.0", Some(118212)),
513 (internal, freeze_impls, "1.78.0", Some(121675)),
515 (unstable, frontmatter, "1.88.0", Some(136889)),
517 (unstable, gen_blocks, "1.75.0", Some(117078)),
519 (incomplete, generic_const_exprs, "1.56.0", Some(76560)),
521 (incomplete, generic_const_items, "1.73.0", Some(113521)),
523 (incomplete, generic_const_parameter_types, "1.87.0", Some(137626)),
525 (incomplete, generic_pattern_types, "1.86.0", Some(136574)),
527 (unstable, global_registration, "1.80.0", Some(125119)),
529 (incomplete, guard_patterns, "1.85.0", Some(129967)),
531 (unstable, half_open_range_patterns_in_slices, "1.66.0", Some(67264)),
533 (unstable, hexagon_target_feature, "1.27.0", Some(150250)),
535 (incomplete, impl_restriction, "CURRENT_RUSTC_VERSION", Some(105077)),
537 (unstable, impl_trait_in_assoc_type, "1.70.0", Some(63063)),
539 (unstable, impl_trait_in_bindings, "1.64.0", Some(63065)),
541 (unstable, impl_trait_in_fn_trait_return, "1.64.0", Some(99697)),
543 (unstable, import_trait_associated_functions, "1.86.0", Some(134691)),
545 (incomplete, inherent_associated_types, "1.52.0", Some(8995)),
547 (unstable, intra_doc_pointers, "1.51.0", Some(80896)),
549 (unstable, lahfsahf_target_feature, "1.78.0", Some(150251)),
551 (unstable, large_assignments, "1.52.0", Some(83518)),
553 (incomplete, lazy_type_alias, "1.72.0", Some(112792)),
555 (unstable, link_arg_attribute, "1.76.0", Some(99427)),
558 (unstable, loongarch_target_feature, "1.73.0", Some(150252)),
560 (incomplete, loop_match, "1.90.0", Some(132306)),
562 (unstable, m68k_target_feature, "1.85.0", Some(134328)),
564 (unstable, macro_attr, "1.91.0", Some(143547)),
566 (unstable, macro_derive, "1.91.0", Some(143549)),
568 (unstable, macro_metavar_expr, "1.61.0", Some(83527)),
570 (unstable, macro_metavar_expr_concat, "1.81.0", Some(124225)),
572 (unstable, marker_trait_attr, "1.30.0", Some(29864)),
574 (incomplete, mgca_type_const_syntax, "1.95.0", Some(132980)),
576 (incomplete, min_generic_const_args, "1.84.0", Some(132980)),
578 (unstable, min_specialization, "1.7.0", Some(31844)),
582 (unstable, mips_target_feature, "1.27.0", Some(150253)),
584 (unstable, more_qualified_paths, "1.54.0", Some(86935)),
586 (unstable, movrs_target_feature, "1.88.0", Some(137976)),
588 (unstable, multiple_supertrait_upcastable, "1.69.0", Some(150833)),
590 (unstable, must_not_suspend, "1.57.0", Some(83310)),
592 (incomplete, mut_ref, "1.79.0", Some(123076)),
594 (unstable, naked_functions_rustic_abi, "1.88.0", Some(138997)),
596 (unstable, naked_functions_target_feature, "1.86.0", Some(138568)),
598 (unstable, native_link_modifiers_as_needed, "1.53.0", Some(81490)),
600 (unstable, negative_impls, "1.44.0", Some(68318)),
602 (incomplete, never_patterns, "1.76.0", Some(118155)),
604 (unstable, never_type, "1.13.0", Some(35121)),
606 (unstable, new_range, "1.86.0", Some(123741)),
608 (unstable, no_core, "1.3.0", Some(29639)),
610 (unstable, non_exhaustive_omitted_patterns_lint, "1.57.0", Some(89554)),
612 (incomplete, non_lifetime_binders, "1.69.0", Some(108185)),
614 (unstable, nvptx_target_feature, "1.91.0", Some(150254)),
616 (unstable, offset_of_enum, "1.75.0", Some(120141)),
618 (unstable, offset_of_slice, "1.81.0", Some(126151)),
620 (unstable, opaque_generic_const_args, "1.95.0", Some(151972)),
622 (unstable, optimize_attribute, "1.34.0", Some(54882)),
624 (unstable, patchable_function_entry, "1.81.0", Some(123115)),
626 (incomplete, pin_ergonomics, "1.83.0", Some(130494)),
628 (unstable, postfix_match, "1.79.0", Some(121618)),
630 (unstable, powerpc_target_feature, "1.27.0", Some(150255)),
632 (unstable, prfchw_target_feature, "1.78.0", Some(150256)),
634 (unstable, proc_macro_hygiene, "1.30.0", Some(54727)),
636 (incomplete, raw_dylib_elf, "1.87.0", Some(135694)),
638 (unstable, reborrow, "1.91.0", Some(145612)),
639 (incomplete, ref_pat_eat_one_layer_2024, "1.79.0", Some(123076)),
641 (incomplete, ref_pat_eat_one_layer_2024_structural, "1.81.0", Some(123076)),
643 (unstable, register_tool, "1.41.0", Some(66079)),
645 (unstable, repr_simd, "1.4.0", Some(27731)),
647 (unstable, return_type_notation, "1.70.0", Some(109417)),
649 (unstable, riscv_target_feature, "1.45.0", Some(150257)),
651 (unstable, rtm_target_feature, "1.35.0", Some(150258)),
653 (unstable, rust_cold_cc, "1.63.0", Some(97544)),
655 (unstable, rust_preserve_none_cc, "1.95.0", Some(151401)),
657 (unstable, s390x_target_feature, "1.82.0", Some(150259)),
659 (unstable, sanitize, "1.91.0", Some(39699)),
661 (unstable, simd_ffi, "1.0.0", Some(27731)),
663 (unstable, sparc_target_feature, "1.84.0", Some(132783)),
665 (incomplete, specialization, "1.7.0", Some(31844)),
667 (unstable, static_align, "1.91.0", Some(146177)),
669 (unstable, stmt_expr_attributes, "1.6.0", Some(15701)),
671 (unstable, strict_provenance_lints, "1.61.0", Some(130351)),
673 (unstable, super_let, "1.88.0", Some(139076)),
675 (unstable, supertrait_item_shadowing, "1.86.0", Some(89151)),
677 (unstable, target_feature_inline_always, "1.91.0", Some(145574)),
679 (unstable, thread_local, "1.0.0", Some(29594)),
681 (unstable, trait_alias, "1.24.0", Some(41517)),
683 (unstable, transmute_generic_consts, "1.70.0", Some(109929)),
685 (unstable, transparent_unions, "1.37.0", Some(60405)),
687 (unstable, trivial_bounds, "1.28.0", Some(48214)),
689 (unstable, try_blocks, "1.29.0", Some(31436)),
691 (unstable, try_blocks_heterogeneous, "1.94.0", Some(149488)),
693 (unstable, type_alias_impl_trait, "1.38.0", Some(63063)),
695 (unstable, type_changing_struct_update, "1.58.0", Some(86555)),
698 (incomplete, unsafe_binders, "1.85.0", Some(130516)),
700 (incomplete, unsafe_fields, "1.85.0", Some(132922)),
702 (incomplete, unsized_const_params, "1.82.0", Some(95174)),
705 (internal, unsized_fn_params, "1.49.0", Some(48055)),
707 (unstable, used_with_arg, "1.60.0", Some(93798)),
709 (unstable, wasm_target_feature, "1.30.0", Some(150260)),
711 (unstable, where_clause_attrs, "1.87.0", Some(115590)),
713 (unstable, x86_amx_intrinsics, "1.81.0", Some(126622)),
715 (unstable, x87_target_feature, "1.85.0", Some(150261)),
717 (unstable, xop_target_feature, "1.81.0", Some(127208)),
719 (unstable, yeet_expr, "1.62.0", Some(96373)),
721 (unstable, yield_expr, "1.87.0", Some(43122)),
722 );
730
731impl Features {
732 pub fn dump_feature_usage_metrics(
733 &self,
734 metrics_path: PathBuf,
735 ) -> Result<(), Box<dyn std::error::Error>> {
736 #[derive(#[doc(hidden)]
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
clippy :: absolute_paths,)]
const _: () =
{
#[allow(unused_extern_crates, clippy :: useless_attribute)]
extern crate serde as _serde;
;
#[automatically_derived]
impl _serde::Serialize for LibFeature {
fn serialize<__S>(&self, __serializer: __S)
-> _serde::__private228::Result<__S::Ok, __S::Error> where
__S: _serde::Serializer {
let mut __serde_state =
_serde::Serializer::serialize_struct(__serializer,
"LibFeature", false as usize + 1 + 1)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"timestamp", &self.timestamp)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"symbol", &self.symbol)?;
_serde::ser::SerializeStruct::end(__serde_state)
}
}
};serde::Serialize)]
737 struct LibFeature {
738 timestamp: u128,
739 symbol: String,
740 }
741
742 #[derive(#[doc(hidden)]
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
clippy :: absolute_paths,)]
const _: () =
{
#[allow(unused_extern_crates, clippy :: useless_attribute)]
extern crate serde as _serde;
;
#[automatically_derived]
impl _serde::Serialize for LangFeature {
fn serialize<__S>(&self, __serializer: __S)
-> _serde::__private228::Result<__S::Ok, __S::Error> where
__S: _serde::Serializer {
let mut __serde_state =
_serde::Serializer::serialize_struct(__serializer,
"LangFeature", false as usize + 1 + 1 + 1)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"timestamp", &self.timestamp)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"symbol", &self.symbol)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"since", &self.since)?;
_serde::ser::SerializeStruct::end(__serde_state)
}
}
};serde::Serialize)]
743 struct LangFeature {
744 timestamp: u128,
745 symbol: String,
746 since: Option<String>,
747 }
748
749 #[derive(#[doc(hidden)]
#[allow(non_upper_case_globals, unused_attributes, unused_qualifications,
clippy :: absolute_paths,)]
const _: () =
{
#[allow(unused_extern_crates, clippy :: useless_attribute)]
extern crate serde as _serde;
;
#[automatically_derived]
impl _serde::Serialize for FeatureUsage {
fn serialize<__S>(&self, __serializer: __S)
-> _serde::__private228::Result<__S::Ok, __S::Error> where
__S: _serde::Serializer {
let mut __serde_state =
_serde::Serializer::serialize_struct(__serializer,
"FeatureUsage", false as usize + 1 + 1)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"lib_features", &self.lib_features)?;
_serde::ser::SerializeStruct::serialize_field(&mut __serde_state,
"lang_features", &self.lang_features)?;
_serde::ser::SerializeStruct::end(__serde_state)
}
}
};serde::Serialize)]
750 struct FeatureUsage {
751 lib_features: Vec<LibFeature>,
752 lang_features: Vec<LangFeature>,
753 }
754
755 let metrics_file = std::fs::File::create(metrics_path)?;
756 let metrics_file = std::io::BufWriter::new(metrics_file);
757
758 let now = || {
759 SystemTime::now()
760 .duration_since(UNIX_EPOCH)
761 .expect("system time should always be greater than the unix epoch")
762 .as_nanos()
763 };
764
765 let lib_features = self
766 .enabled_lib_features
767 .iter()
768 .map(|EnabledLibFeature { gate_name, .. }| LibFeature {
769 symbol: gate_name.to_string(),
770 timestamp: now(),
771 })
772 .collect();
773
774 let lang_features = self
775 .enabled_lang_features
776 .iter()
777 .map(|EnabledLangFeature { gate_name, stable_since, .. }| LangFeature {
778 symbol: gate_name.to_string(),
779 since: stable_since.map(|since| since.to_string()),
780 timestamp: now(),
781 })
782 .collect();
783
784 let feature_usage = FeatureUsage { lib_features, lang_features };
785
786 serde_json::to_writer(metrics_file, &feature_usage)?;
787
788 Ok(())
789 }
790}
791
792pub const INCOMPATIBLE_FEATURES: &[(Symbol, Symbol)] = &[
796 (sym::ref_pat_eat_one_layer_2024, sym::ref_pat_eat_one_layer_2024_structural),
799];
800
801pub const DEPENDENT_FEATURES: &[(Symbol, &[Symbol])] = &[
803 (sym::opaque_generic_const_args, &[sym::min_generic_const_args]),
804 (sym::unsized_const_params, &[sym::adt_const_params]),
805];