Skip to content

Commit 378fa89

Browse files
committed
Fix indentation of static path restriction text
In the const eval chapter, we have a list of kinds of expressions that are allowed. Paths to statics are one kind that is allowed, but have certain restrictions we describe in bullet points. We then have text that clarifies when these bullet points are checked. This text was outdented beyond the relevant item, which broke up the outer bullet point list and created (momentary) ambiguity about the scope of the rules the language might be affecting. Let's fix that.
1 parent 6110395 commit 378fa89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/const_eval.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ r[const-eval.const-expr.path-static]
4646
* Reads from `extern` statics are not allowed in any constant evaluation context.
4747
* If the evaluation is *not* carried out in an initializer of a `static` item, then reads from any mutable `static` are not allowed. A mutable `static` is a `static mut` item, or a `static` item with an interior-mutable type.
4848

49-
These requirements are checked only when the constant is evaluated. In other words, having such accesses syntactically occur in const contexts is allowed as long as they never get executed.
49+
These requirements are checked only when the constant is evaluated. In other words, having such accesses syntactically occur in const contexts is allowed as long as they never get executed.
5050

5151
r[const-eval.const-expr.tuple]
5252
* [Tuple expressions].

0 commit comments

Comments
 (0)