Skip to content

Commit

Permalink
Rollup merge of rust-lang#124486 - beetrees:vectorcall-tracking-issue…
Browse files Browse the repository at this point in the history
…, r=ehuss

Add tracking issue and unstable book page for `"vectorcall"` ABI

Originally added in 2015 by rust-lang#30567, the Windows `"vectorcall"` ABI didn't have a tracking issue until now.

Tracking issue: rust-lang#124485
  • Loading branch information
matthiaskrgr authored Jun 3, 2024
2 parents 16c670c + fc1e52a commit ce4842c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_feature/src/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@ declare_features! (

/// Allows using the `unadjusted` ABI; perma-unstable.
(internal, abi_unadjusted, "1.16.0", None),
/// Allows using the `vectorcall` ABI.
(unstable, abi_vectorcall, "1.7.0", None),
/// Allows using `#![needs_allocator]`, an implementation detail of `#[global_allocator]`.
(internal, allocator_internals, "1.20.0", None),
/// Allows using `#[allow_internal_unsafe]`. This is an
Expand Down Expand Up @@ -243,6 +241,8 @@ declare_features! (
// feature-group-start: internal feature gates
// -------------------------------------------------------------------------

/// Allows using the `vectorcall` ABI.
(unstable, abi_vectorcall, "1.7.0", Some(124485)),
/// Allows features specific to auto traits.
/// Renamed from `optin_builtin_traits`.
(unstable, auto_traits, "1.50.0", Some(13231)),
Expand Down
19 changes: 19 additions & 0 deletions src/doc/unstable-book/src/language-features/abi-vectorcall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# `abi_vectorcall`

The tracking issue for this feature is: [#124485]

[#124485]: https://github.com/rust-lang/rust/issues/124485

------------------------

Adds support for the Windows `"vectorcall"` ABI, the equivalent of `__vectorcall` in MSVC.

```rust,ignore (only-windows-or-x86-or-x86-64)
extern "vectorcall" {
fn add_f64s(x: f64, y: f64) -> f64;
}
fn main() {
println!("{}", add_f64s(2.0, 4.0));
}
```
7 changes: 7 additions & 0 deletions tests/ui/feature-gates/feature-gate-vectorcall.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | extern "vectorcall" fn f() {}
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -13,6 +14,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | extern "vectorcall" fn m();
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -22,6 +24,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | extern "vectorcall" fn dm() {}
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -31,6 +34,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | extern "vectorcall" fn m() {}
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -40,6 +44,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | extern "vectorcall" fn im() {}
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -49,6 +54,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | type TA = extern "vectorcall" fn();
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand All @@ -58,6 +64,7 @@ error[E0658]: vectorcall is experimental and subject to change
LL | extern "vectorcall" {}
| ^^^^^^^^^^^^
|
= note: see issue #124485 <https://github.com/rust-lang/rust/issues/124485> for more information
= help: add `#![feature(abi_vectorcall)]` to the crate attributes to enable
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date

Expand Down

0 comments on commit ce4842c

Please sign in to comment.