File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,16 @@ r[const-eval.const-expr.path-item]
4242 Recursively defining constants is not allowed.
4343
4444r[ const-eval.const-expr.path-static]
45- * Paths to [ statics] with these restrictions and observations .
45+ * Paths to [ statics] with these restrictions.
4646 * Writes to ` static ` items are not allowed in any constant evaluation context.
4747 * Reads from ` extern ` statics are not allowed in any constant evaluation context.
4848 * If the evaluation is * not* carried out in an initializer of a ` static ` item,
4949 then reads from any mutable ` static ` are not allowed.
5050 A mutable ` static ` is a ` static mut ` item, or a ` static ` item with an interior-mutable type.
5151
52+ These requirements are checked only when the constant is evaluated.
53+ In other words, having such accessed syntactically occur in const contexts is allowed as long as they never get executed.
54+
5255r[ const-eval.const-expr.tuple]
5356* [ Tuple expressions] .
5457
You can’t perform that action at this time.
0 commit comments