From dd32a8ea8cc4de83c00d6a01047d181567d04693 Mon Sep 17 00:00:00 2001 From: Matthew Woodcraft Date: Mon, 9 May 2022 19:34:15 +0100 Subject: [PATCH] Say that `const extern` functions can only use "Rust" or "C" --- src/items/functions.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/items/functions.md b/src/items/functions.md index f4837e0af..6a2ab4e16 100644 --- a/src/items/functions.md +++ b/src/items/functions.md @@ -216,6 +216,8 @@ 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 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 @@ -382,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