Skip to content

Commit 17485ac

Browse files
authored
Crosslink const eval document
1 parent d9c33a4 commit 17485ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/items/functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,8 @@ attributes].
162162

163163
## Const functions
164164

165-
Functions can be `const`, meaning they can be called from within array length
166-
expressions and the initializer of constants, statics and enum discriminants.
167-
When called from such a so-called "const context", the function is interpreted
165+
Functions can be `const`, meaning they can be called from within
166+
[const contexts]. When called from a const context, the function is interpreted
168167
by the compiler at compile time. The interpretation happens in the environment
169168
of the compilation target and not the host. So `usize` is `32` bits if you are
170169
compiling against a `32` bit system, irrelevant of whether you are building on
@@ -224,6 +223,7 @@ Exhaustive list of permitted structures in `const fn`:
224223
[_Statement_]: statements.html
225224
[_Type_]: types.html
226225
[_WhereClause_]: items/generics.html#where-clauses
226+
[const contexts]: const_eval.html
227227
[external blocks]: items/external-blocks.html
228228
[path]: paths.html
229229
[block]: expressions/block-expr.html

0 commit comments

Comments
 (0)