Skip to content

Commit e57b2ee

Browse files
authored
Merge pull request #474 from jturner314/fix-typos-const-fns
Fix minor typos in const functions section
2 parents 01e21c1 + 3718dac commit e57b2ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/items/functions.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ implemented by executing an illegal instruction.
140140
## Const functions
141141

142142
Functions qualified with the `const` keyword are const functions. _Const
143-
functions_ can be called from within [const contexts]. When called from a const
143+
functions_ can be called from within [const context]s. When called from a const
144144
context, the function is interpreted by the compiler at compile time. The
145145
interpretation happens in the environment of the compilation target and not the
146146
host. So `usize` is `32` bits if you are compiling against a `32` bit system,
@@ -150,7 +150,7 @@ If a const function is called outside a [const context], it is indistinguishable
150150
from any other function. You can freely do anything with a const function that
151151
you can do with a regular function.
152152

153-
Const functions have various restrictions to make sure that they can't be
153+
Const functions have various restrictions to make sure that they can be
154154
evaluated at compile-time. It is, for example, not possible to write a random
155155
number generator as a const function. Calling a const function at compile-time
156156
will always yield the same result as calling it at runtime, even when called
@@ -222,7 +222,7 @@ attributes macros.
222222
[_Statement_]: statements.html
223223
[_Type_]: types.html#type-expressions
224224
[_WhereClause_]: items/generics.html#where-clauses
225-
[const contexts]: const_eval.html
225+
[const context]: const_eval.html#const-context
226226
[external blocks]: items/external-blocks.html
227227
[path]: paths.html
228228
[block]: expressions/block-expr.html

0 commit comments

Comments
 (0)