From e8c43a6a49963e571c2a092af3df1bf8ff1d9764 Mon Sep 17 00:00:00 2001 From: Ding Xiang Fei Date: Thu, 10 Oct 2024 01:47:48 +0800 Subject: [PATCH] apply suggestion on the use of `statics` in const-eval --- src/const_eval.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/const_eval.md b/src/const_eval.md index c7140db0b..edc058f9f 100644 --- a/src/const_eval.md +++ b/src/const_eval.md @@ -23,9 +23,10 @@ to be run. * [Const parameters]. * [Paths] to [functions] and [constants]. Recursively defining constants is not allowed. -* Paths to immutable [statics]. - * Reads of [`extern` statics] are not allowed. - * Reads from and writes to a `static` with interior mutability are not allowed. +* Paths to immutable [statics] with these restrictions and observations. + * In particular, reads and writes to `static mut` are not allowed. + * Reads out of and writes into a `static` with data equipped with interior mutability are not allowed. + * Reads out of and writes into [`extern` statics] are not allowed. * [Tuple expressions]. * [Array expressions]. * [Struct] expressions.