Skip to content

Commit a78b6c2

Browse files
committed
Clarify default when not using extern fn
Due to changes we've recently merged discussing the default ABI of an `extern` that doesn't specify one ("C"), the description of "Rust" being the default ABI for functions that followed immediately after this read as a bit odd. Let's revise this to clarify that "Rust" is the default ABI when `extern fn` is not used.
1 parent e8969f7 commit a78b6c2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/items/external-blocks.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ r[items.extern.abi.standard]
118118
The following ABI strings are supported on all platforms:
119119
120120
r[items.extern.abi.rust]
121-
* `unsafe extern "Rust"` --- The native calling convention for Rust functions and closures. This is the default when the function's ABI is not specified. The Rust ABI offers no stability guarantees.
121+
* `unsafe extern "Rust"` --- The native calling convention for Rust functions and closures. This is the default when a function is declared without using [`extern fn`]. The Rust ABI offers no stability guarantees.
122122
123123
r[items.extern.abi.c]
124124
* `unsafe extern "C"` --- The "C" ABI attempts to match the default ABI chosen by the dominant C compiler for the target.
@@ -519,6 +519,7 @@ restrictions as [regular function parameters].
519519
[WebAssembly module]: https://webassembly.github.io/spec/core/syntax/modules.html
520520
[`bundle` documentation for rustc]: ../../rustc/command-line-arguments.html#linking-modifiers-bundle
521521
[`dylib` versus `raw-dylib`]: #dylib-versus-raw-dylib
522+
[`extern fn`]: items.fn.extern
522523
[`unsafe` context]: ../unsafe-keyword.md
523524
[`verbatim` documentation for rustc]: ../../rustc/command-line-arguments.html#linking-modifiers-verbatim
524525
[`whole-archive` documentation for rustc]: ../../rustc/command-line-arguments.html#linking-modifiers-whole-archive

0 commit comments

Comments
 (0)