Skip to content

Commit 8e36971

Browse files
authored
Merge pull request #1207 from mattheww/2022-05_const_extern_fn
Stop saying that const functions cannot use 'extern'
2 parents b8ac38e + dd32a8e commit 8e36971

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/items/functions.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ Functions qualified with the `const` keyword are [const functions], as are
216216
[tuple struct] and [tuple variant] constructors. _Const functions_ can be
217217
called from within [const contexts].
218218

219-
Const functions are not allowed to be [async](#async-functions), and cannot
220-
use the [`extern` function qualifier](#extern-function-qualifier).
219+
Const functions may use the [`extern`] function qualifier, but only with the `"Rust"` and `"C"` ABIs.
220+
221+
Const functions are not allowed to be [async](#async-functions).
221222

222223
## Async functions
223224

@@ -383,6 +384,7 @@ fn foo_oof(#[some_inert_attribute] arg: u8) {
383384
[const functions]: ../const_eval.md#const-functions
384385
[tuple struct]: structs.md
385386
[tuple variant]: enumerations.md
387+
[`extern`]: #extern-function-qualifier
386388
[external block]: external-blocks.md
387389
[path]: ../paths.md
388390
[block]: ../expressions/block-expr.md

0 commit comments

Comments
 (0)