* - `type_ascription` - Allows type ascription expressions `expr: Type`.
+* - `abi_vectorcall` - Allows the usage of the vectorcall calling convention
+ (e.g. `extern "vectorcall" func fn_();`)
+
If a feature is promoted to a language feature, then all existing programs will
start to receive compilation warnings about `#![feature]` directives which enabled
the new feature (because the directive is no longer necessary). However, if a
// 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)
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
};
"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);
--- /dev/null
+// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+extern "vectorcall" { //~ ERROR vectorcall is experimental and subject to change
+ fn bar();
+}
+
+extern "vectorcall" fn baz() { //~ ERROR vectorcall is experimental and subject to change
+}
+
+fn main() {
+}