Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop saying that const functions cannot use 'extern' #1207

Merged
merged 2 commits into from
May 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/items/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ Functions qualified with the `const` keyword are [const functions], as are
[tuple struct] and [tuple variant] constructors. _Const functions_ can be
called from within [const contexts].

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

Const functions are not allowed to be [async](#async-functions).

## Async functions

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