};
($((removed, $feature: ident, $ver: expr, $issue: expr),)+) => {
- /// Represents features which has since been removed (it was once Active)
+ /// Represents unstable features which have since been removed (it was once Active)
const REMOVED_FEATURES: &'static [(&'static str, &'static str, Option<u32>)] = &[
$((stringify!($feature), $ver, $issue)),+
];
};
+ ($((stable_removed, $feature: ident, $ver: expr, $issue: expr),)+) => {
+ /// Represents stable features which have since been removed (it was once Accepted)
+ const STABLE_REMOVED_FEATURES: &'static [(&'static str, &'static str, Option<u32>)] = &[
+ $((stringify!($feature), $ver, $issue)),+
+ ];
+ };
+
($((accepted, $feature: ident, $ver: expr, $issue: expr),)+) => {
/// Those language feature has since been Accepted (it was once Active)
const ACCEPTED_FEATURES: &'static [(&'static str, &'static str, Option<u32>)] = &[
// Used to identify crates that contain sanitizer runtimes
// rustc internal
(active, sanitizer_runtime, "1.17.0", None),
+
+ // `extern "x86-interrupt" fn()`
+ (active, abi_x86_interrupt, "1.17.0", Some(40180)),
);
declare_features! (
(removed, pushpop_unsafe, "1.2.0", None),
);
+declare_features! (
+ (stable_removed, no_stack_check, "1.0.0", None),
+);
+
declare_features! (
(accepted, associated_types, "1.0.0", None),
// allow overloading augmented assignment operations like `a += b`
not yet settled",
cfg_fn!(structural_match))),
- // Not used any more, but we can't feature gate it
- ("no_stack_check", Normal, Ungated),
-
("plugin", CrateLevel, Gated(Stability::Unstable,
"plugin",
"compiler plugins are experimental \
"attribute proc macros are currently unstable",
cfg_fn!(proc_macro))),
+ ("proc_macro", Normal, Gated(Stability::Unstable,
+ "proc_macro",
+ "function-like proc macros are currently unstable",
+ cfg_fn!(proc_macro))),
+
("rustc_derive_registrar", Normal, Gated(Stability::Unstable,
"rustc_derive_registrar",
"used internally by rustc",
// assert!(issue.is_some())
issue
} else {
- // search in Accepted or Removed features
- match ACCEPTED_FEATURES.iter().chain(REMOVED_FEATURES).find(|t| t.0 == feature) {
+ // search in Accepted, Removed, or Stable Removed features
+ let found = ACCEPTED_FEATURES.iter().chain(REMOVED_FEATURES).chain(STABLE_REMOVED_FEATURES)
+ .find(|t| t.0 == feature);
+ match found {
Some(&(_, _, issue)) => issue,
None => panic!("Feature `{}` is not declared anywhere", feature),
}
gate_feature_post!(&self, abi_msp430_interrupt, span,
"msp430-interrupt ABI is experimental and subject to change");
},
+ Abi::X86Interrupt => {
+ gate_feature_post!(&self, abi_x86_interrupt, span,
+ "x86-interrupt ABI is experimental and subject to change");
+ },
// Stable
Abi::Cdecl |
Abi::Stdcall |
feature_checker.collect(&features, mi.span);
}
else if let Some(&(_, _, _)) = REMOVED_FEATURES.iter()
- .find(|& &(n, _, _)| name == n) {
+ .find(|& &(n, _, _)| name == n)
+ .or_else(|| STABLE_REMOVED_FEATURES.iter()
+ .find(|& &(n, _, _)| name == n)) {
span_err!(span_handler, mi.span, E0557, "feature has been removed");
}
else if let Some(&(_, _, _)) = ACCEPTED_FEATURES.iter()