diff --git a/src/const_eval.md b/src/const_eval.md index 1b8031b5f..306c2afcf 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -43,7 +43,8 @@ r[const-eval.const-expr.path-item] r[const-eval.const-expr.path-static] * Paths to [statics] with these restrictions and observations. - * In particular, reads and writes to any `static mut` or [`extern` statics] is not allowed. + * If the evaluation is carried out in an initializer of a `const` item, or inside a `const` block, reads and writes to any `static mut` or [`extern` statics] are not allowed. + * If the evaluation is carried out in an initializer of a `static` item, reads into a `static`, or inside `unsafe` blocks reads into `static mut` are allowed. Reads and writes to `extern` statics are still not allowed. r[const-eval.const-expr.tuple] * [Tuple expressions]. diff --git a/src/items/constant-items.md b/src/items/constant-items.md index 770d08878..bb8a43827 100644 --- a/src/items/constant-items.md +++ b/src/items/constant-items.md @@ -48,6 +48,7 @@ const BITS_N_STRINGS: BitsNStrings<'static> = BitsNStrings { }; ``` +r[items.const.final-value-immutable] The final value of a `const` item cannot contain references to anything mutable. r[items.const.expr-omission]