Skip to content

Commit 95acdf2

Browse files
committed
update status of interning-time const check
1 parent 87c3c87 commit 95acdf2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

const.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@ at type `&Option<Cell<i32>>` would be rejected by the naive analysis above, but
5555
is actually accepted by the compiler because we know that there is no
5656
`UnsafeCell` here that would permit interior mutability.
5757

58-
*Dynamic check.* The Miri engine could check this dynamically by ensuring that
59-
the new data that is interned for a constant is all marked as
60-
immutable. (Constants referring to already existing mutable data are not
61-
inherently problematic.)
58+
*Dynamic check.* The Miri engine enforces this dynamically by ensuring that the
59+
new data that is interned for a constant is all marked as immutable. However,
60+
note the FIXME added [by this PR](https://github.com/rust-lang/rust/pull/63955):
61+
for untyped data in a constant, we currently just *make* it immutable, instead
62+
of checking properly.
6263

6364
### 3. `Sync`
6465

0 commit comments

Comments
 (0)