Skip to content

Commit 46f9e87

Browse files
Stabilize abi_efiapi feature
Tracking issue: rust-lang#65815
1 parent 1e4f900 commit 46f9e87

File tree

11 files changed

+11
-140
lines changed

11 files changed

+11
-140
lines changed

compiler/rustc_feature/src/accepted.rs

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ declare_features! (
4848

4949
/// Allows `#[target_feature(...)]` on aarch64 platforms
5050
(accepted, aarch64_target_feature, "1.61.0", Some(44839), None),
51+
/// Allows using the `efiapi` ABI.
52+
(accepted, abi_efiapi, "CURRENT_RUSTC_VERSION", Some(65815), None),
5153
/// Allows the sysV64 ABI to be specified on all platforms
5254
/// instead of just the platforms on which it is the C ABI.
5355
(accepted, abi_sysv64, "1.24.0", Some(36167), None),

compiler/rustc_feature/src/active.rs

-2
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,6 @@ declare_features! (
282282
(active, abi_avr_interrupt, "1.45.0", Some(69664), None),
283283
/// Allows `extern "C-cmse-nonsecure-call" fn()`.
284284
(active, abi_c_cmse_nonsecure_call, "1.51.0", Some(81391), None),
285-
/// Allows using the `efiapi` ABI.
286-
(active, abi_efiapi, "1.40.0", Some(65815), None),
287285
/// Allows `extern "msp430-interrupt" fn()`.
288286
(active, abi_msp430_interrupt, "1.16.0", Some(38487), None),
289287
/// Allows `extern "ptx-*" fn()`.

compiler/rustc_target/src/spec/abi.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
149149
match name {
150150
// Stable
151151
"Rust" | "C" | "cdecl" | "stdcall" | "fastcall" | "aapcs" | "win64" | "sysv64"
152-
| "system" => Ok(()),
152+
| "system" | "efiapi" => Ok(()),
153153
"rust-intrinsic" => Err(AbiDisabled::Unstable {
154154
feature: sym::intrinsics,
155155
explain: "intrinsics are subject to change",
@@ -198,10 +198,6 @@ pub fn is_stable(name: &str) -> Result<(), AbiDisabled> {
198198
feature: sym::abi_avr_interrupt,
199199
explain: "avr-interrupt and avr-non-blocking-interrupt ABIs are experimental and subject to change",
200200
}),
201-
"efiapi" => Err(AbiDisabled::Unstable {
202-
feature: sym::abi_efiapi,
203-
explain: "efiapi ABI is experimental and subject to change",
204-
}),
205201
"C-cmse-nonsecure-call" => Err(AbiDisabled::Unstable {
206202
feature: sym::abi_c_cmse_nonsecure_call,
207203
explain: "C-cmse-nonsecure-call ABI is experimental and subject to change",

src/doc/unstable-book/src/language-features/abi-efiapi.md

-23
This file was deleted.

tests/codegen/abi-efiapi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// compile-flags: -C no-prepopulate-passes
1515

1616
#![crate_type = "lib"]
17-
#![feature(no_core, lang_items, abi_efiapi)]
17+
#![feature(no_core, lang_items)]
1818
#![no_core]
1919

2020
#[lang="sized"]

tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(abi_efiapi)]
2-
31
fn efiapi(f: extern "efiapi" fn(usize, ...)) {
42
//~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
53
//~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable

tests/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
2-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
2+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:1:14
33
|
44
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -8,13 +8,13 @@ LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
88
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
99

1010
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
11-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
11+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:1:14
1212
|
1313
LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
1515

1616
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
17-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
17+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:6:12
1818
|
1919
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2020
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,13 +23,13 @@ LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2323
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
2424

2525
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
26-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
26+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:6:12
2727
|
2828
LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
2929
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
3030

3131
error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
32-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
32+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11
3333
|
3434
LL | fn win(f: extern "win64" fn(usize, ...)) {
3535
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -38,7 +38,7 @@ LL | fn win(f: extern "win64" fn(usize, ...)) {
3838
= help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
3939

4040
error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
41-
--> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
41+
--> $DIR/feature-gate-extended_varargs_abi_support.rs:11:11
4242
|
4343
LL | fn win(f: extern "win64" fn(usize, ...)) {
4444
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention

tests/ui/c-variadic/variadic-ffi-2.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// ignore-arm stdcall isn't supported
22
#![feature(extended_varargs_abi_support)]
3-
#![feature(abi_efiapi)]
43

54
fn baz(f: extern "stdcall" fn(usize, ...)) {
65
//~^ ERROR: C-variadic function must have a compatible calling convention,

tests/ui/c-variadic/variadic-ffi-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `win64`, `sysv64` or `efiapi`
2-
--> $DIR/variadic-ffi-2.rs:5:11
2+
--> $DIR/variadic-ffi-2.rs:4:11
33
|
44
LL | fn baz(f: extern "stdcall" fn(usize, ...)) {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention

tests/ui/feature-gates/feature-gate-abi-efiapi.rs

-33
This file was deleted.

tests/ui/feature-gates/feature-gate-abi-efiapi.stderr

-66
This file was deleted.

0 commit comments

Comments
 (0)