// Allows cfg(target_thread_local)
("cfg_target_thread_local", "1.7.0", Some(29594), Active),
+
+ // rustc internal
+ ("abi_vectorcall", "1.7.0", None, Active)
];
// (changing above list without updating src/doc/reference.md makes @cmr sad)
// But we keep these checks as a pre-expansion check to catch
// uses in e.g. conditionalized code.
- if let ast::ExprBox(_) = e.node {
+ if let ast::ExprKind::Box(_) = e.node {
self.context.gate_feature("box_syntax", e.span, EXPLAIN_BOX_SYNTAX);
}
- if let ast::ExprInPlace(..) = e.node {
+ if let ast::ExprKind::InPlace(..) = e.node {
self.context.gate_feature("placement_in_syntax", e.span, EXPLAIN_PLACEMENT_IN);
}
fn visit_item(&mut self, i: &ast::Item) {
match i.node {
- ast::ItemExternCrate(_) => {
+ ast::ItemKind::ExternCrate(_) => {
if attr::contains_name(&i.attrs[..], "macro_reexport") {
self.gate_feature("macro_reexport", i.span,
"macros reexports are experimental \
}
}
- ast::ItemForeignMod(ref foreign_module) => {
+ ast::ItemKind::ForeignMod(ref foreign_module) => {
if attr::contains_name(&i.attrs[..], "link_args") {
self.gate_feature("link_args", i.span,
"the `link_args` attribute is not portable \
Abi::PlatformIntrinsic => {
Some(("platform_intrinsics",
"platform intrinsics are experimental and possibly buggy"))
+ },
+ Abi::Vectorcall => {
+ Some(("abi_vectorcall",
+ "vectorcall is experimental and subject to change"
+ ))
}
_ => None
};
}
}
- ast::ItemFn(..) => {
+ ast::ItemKind::Fn(..) => {
if attr::contains_name(&i.attrs[..], "plugin_registrar") {
self.gate_feature("plugin_registrar", i.span,
"compiler plugins are experimental and possibly buggy");
}
}
- ast::ItemStruct(..) => {
+ ast::ItemKind::Struct(..) => {
if attr::contains_name(&i.attrs[..], "simd") {
self.gate_feature("simd", i.span,
"SIMD types are experimental and possibly buggy");
}
}
- ast::ItemDefaultImpl(..) => {
+ ast::ItemKind::DefaultImpl(..) => {
self.gate_feature("optin_builtin_traits",
i.span,
"default trait implementations are experimental \
and possibly buggy");
}
- ast::ItemImpl(_, polarity, _, _, _, _) => {
+ ast::ItemKind::Impl(_, polarity, _, _, _, _) => {
match polarity {
ast::ImplPolarity::Negative => {
self.gate_feature("optin_builtin_traits",
fn visit_expr(&mut self, e: &ast::Expr) {
match e.node {
- ast::ExprBox(_) => {
+ ast::ExprKind::Box(_) => {
self.gate_feature("box_syntax",
e.span,
"box expression syntax is experimental; \
you can call `Box::new` instead.");
}
- ast::ExprType(..) => {
+ ast::ExprKind::Type(..) => {
self.gate_feature("type_ascription", e.span,
"type ascription is experimental");
}
"intrinsics are subject to change")
}
FnKind::ItemFn(_, _, _, _, abi, _) |
- FnKind::Method(_, &ast::MethodSig { abi, .. }, _) if abi == Abi::RustCall => {
- self.gate_feature("unboxed_closures",
- span,
- "rust-call ABI is subject to change")
- }
+ FnKind::Method(_, &ast::MethodSig { abi, .. }, _) => match abi {
+ Abi::RustCall => {
+ self.gate_feature("unboxed_closures", span,
+ "rust-call ABI is subject to change");
+ },
+ Abi::Vectorcall => {
+ self.gate_feature("abi_vectorcall", span,
+ "vectorcall is experimental and subject to change");
+ },
+ _ => {}
+ },
_ => {}
}
visit::walk_fn(self, fn_kind, fn_decl, block, span);
fn visit_trait_item(&mut self, ti: &'v ast::TraitItem) {
match ti.node {
- ast::ConstTraitItem(..) => {
+ ast::TraitItemKind::Const(..) => {
self.gate_feature("associated_consts",
ti.span,
"associated constants are experimental")
}
- ast::MethodTraitItem(ref sig, _) => {
+ ast::TraitItemKind::Method(ref sig, _) => {
if sig.constness == ast::Constness::Const {
self.gate_feature("const_fn", ti.span, "const fn is unstable");
}
}
- ast::TypeTraitItem(_, Some(_)) => {
+ ast::TraitItemKind::Type(_, Some(_)) => {
self.gate_feature("associated_type_defaults", ti.span,
"associated type defaults are unstable");
}
Some(list) => {
for mi in list {
let name = match mi.node {
- ast::MetaWord(ref word) => (*word).clone(),
+ ast::MetaItemKind::Word(ref word) => (*word).clone(),
_ => {
span_handler.span_err(mi.span,
"malformed feature, expected just \