diff --git a/src/const_eval.md b/src/const_eval.md index 71f392dc3f..89b50f12bb 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -14,11 +14,13 @@ Certain forms of expressions, called constant expressions, can be evaluated at compile time. r[const-eval.const-expr.const-context] -In [const contexts](#const-context), these are the only allowed -expressions, and are always evaluated at compile time. +Expressions in a [const context] must be constant expressions. + +r[const-eval.const-expr.evaluation] +Expressions in const contexts are always evaluated at compile time. r[const-eval.const-expr.runtime-context] -In other places, such as [let statements], constant expressions *may* be, but are not guaranteed to be, evaluated at compile time. +Outside of const contexts, constant expressions *may* be, but are not guaranteed to be, evaluated at compile time. r[const-eval.const-expr.error] Behaviors such as out of bounds [array indexing] or [overflow] are compiler errors if the value