From 160f4b92586326d2eac0b6ee3bbe1bee33910f22 Mon Sep 17 00:00:00 2001 From: kirtchev-adacore Date: Tue, 3 Feb 2026 11:09:59 +0200 Subject: [PATCH] [Change]: [1.93] Stabilize ABI of C-style variadic function declarations This PR clarifies the semantics of the `extern "system"` ABI kind. Issue: https://github.com/rust-lang/fls/issues/646 --- src/changelog.rst | 3 +++ src/ffi.rst | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/changelog.rst b/src/changelog.rst index e9baad4c..cbf065aa 100644 --- a/src/changelog.rst +++ b/src/changelog.rst @@ -27,6 +27,9 @@ Language changes in Rust 1.93.0 - No change: the target is outside the scope of FLS - `Stabilize declaration of C-style variadic functions for the system ABI `_ + + - Changed paragraph: :p:`fls_8m7pc3riokst` + - `Emit error when using some keyword as a cfg predicate `_ - No change: this bug was not documented in FLS diff --git a/src/ffi.rst b/src/ffi.rst index 7ab1b6d3..df6e8f12 100644 --- a/src/ffi.rst +++ b/src/ffi.rst @@ -74,7 +74,7 @@ The following :t:`[ABI]s` are supported: :dt:`Rust ABI`. * :dp:`fls_8m7pc3riokst` - ``extern "system"`` - The operating system-dependent :t:`ABI`. + ``extern "system"`` - The operating system-dependent :t:`ABI`. This :t:`ABI kind` is equivalent to ``extern "C"`` except on Windows x86_32 where it is equivalent to ``extern "stdcall"`` for non-:t:`[variadic function]s`, and equivalent to ``extern "C"`` for :t:`[variadic function]s`. * :dp:`fls_NQAzj5ai1La5` ``extern "system-unwind"`` - The same as ``extern "system"`` with the @@ -108,6 +108,9 @@ include, but may not be limited to, the following: ``extern "cdecl-unwind"`` - The same as ``extern "cdecl"`` with the addition that unwinding across FFI is permitted. +* :dp:`fls_JHlqXjn4Sf07` + ``extern "efiapi"`` - The :t:`ABI` for `UEFI `_. + * :dp:`fls_6rtj6rwqxojh` ``extern "fastcall"`` - The ``fastcall`` :t:`ABI` that corresponds to MSVC's ``__fastcall`` and GCC and clang's ``__attribute__((fastcall))``. @@ -133,9 +136,6 @@ include, but may not be limited to, the following: ``extern "win64-unwind"`` - The same as ``extern "win64"`` with the addition that unwinding across FFI is permitted. -* :dp:`fls_JHlqXjn4Sf07` - ``extern "efiapi"`` - The :t:`ABI` for `UEFI `_. - .. rubric:: Undefined Behavior :dp:`fls_M4LqHf8hbPA8`