Skip to content

Commit ff6b74d

Browse files
authored
Merge pull request #2068 from tshepang/patch-1
const_eval.md: add missing word
2 parents 657e90a + 666907b commit ff6b74d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/const_eval.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ Certain forms of expressions, called constant expressions, can be evaluated at
1414
compile time.
1515

1616
r[const-eval.const-expr.const-context]
17-
In [const contexts](#const-context), these are the only allowed
18-
expressions, and are always evaluated at compile time.
17+
Expressions in a [const context] must be constant expressions.
18+
19+
r[const-eval.const-expr.evaluation]
20+
Expressions in const contexts are always evaluated at compile time.
1921

2022
r[const-eval.const-expr.runtime-context]
21-
In other places, such as [let statements], constant expressions *may* be, but are not guaranteed to be, evaluated at compile time.
23+
Outside of const contexts, constant expressions *may* be, but are not guaranteed to be, evaluated at compile time.
2224

2325
r[const-eval.const-expr.error]
2426
Behaviors such as out of bounds [array indexing] or [overflow] are compiler errors if the value

0 commit comments

Comments
 (0)