Skip to content

Commit dd32a8e

Browse files
committed
Say that const extern functions can only use "Rust" or "C"
1 parent 921ed7c commit dd32a8e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/items/functions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ 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 may use the [`extern`] function qualifier, but only with the `"Rust"` and `"C"` ABIs.
220+
219221
Const functions are not allowed to be [async](#async-functions).
220222

221223
## Async functions
@@ -382,6 +384,7 @@ fn foo_oof(#[some_inert_attribute] arg: u8) {
382384
[const functions]: ../const_eval.md#const-functions
383385
[tuple struct]: structs.md
384386
[tuple variant]: enumerations.md
387+
[`extern`]: #extern-function-qualifier
385388
[external block]: external-blocks.md
386389
[path]: ../paths.md
387390
[block]: ../expressions/block-expr.md

0 commit comments

Comments
 (0)