Skip to content

Commit 1a46fd9

Browse files
committed
Add note about phasing out implicit extern ABI
We're going to stop accepting `extern` without an explicit ABI in the next edition. Let's made a note about this.
1 parent 704ced1 commit 1a46fd9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/items/external-blocks.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,12 @@ r[items.extern.abi.rust]
114114
* `unsafe extern "Rust"` --- The default ABI when you write a normal `fn foo()` in any Rust code.
115115

116116
r[items.extern.abi.c]
117-
* `unsafe extern "C"` --- This is the same as `extern fn foo()`; whatever the default
118-
your C compiler supports.
117+
* `unsafe extern "C"` --- This is the same as `extern fn foo()`; whatever the default your C compiler supports.
118+
119+
> [!NOTE]
120+
> The `extern` syntax without an explicit ABI is being phased out, so it's better to always write the ABI explicitly.
121+
>
122+
> For more details, see Rust issue [#134986](https://github.com/rust-lang/rust/issues/134986).
119123
120124
r[items.extern.abi.system]
121125
* `unsafe extern "system"` --- Usually the same as `extern "C"`, except on Win32, in which case it's `"stdcall"`, or what you should use to link to the Windows API itself.

0 commit comments

Comments
 (0)