Skip to content

Commit c910022

Browse files
committed
update for changed CTFE dynamic check situation
1 parent e9c3add commit c910022

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

const.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ is actually accepted by the compiler because we know that there is no
5757
`UnsafeCell` here that would permit interior mutability.
5858

5959
*Dynamic check.* The Miri engine enforces this dynamically by ensuring that the
60-
new data that is interned for a constant is all marked as immutable. However,
61-
note the FIXME added [by this PR](https://github.com/rust-lang/rust/pull/63955):
62-
for untyped data in a constant, we currently just *make* it immutable, instead
63-
of checking properly.
60+
new data that is interned for a constant is all marked as immutable.
6461

6562
Note that a constant *referring to* some already existing mutable memory is
6663
fine: inlining that reference everywhere has the same behavior as computing a
@@ -113,5 +110,5 @@ was about first computing a `&Cell<i32>` and then using it at run-time (and
113110
observing the fact that it has been "deduplicated"), this here is about using
114111
such a value at compile-time even though it might be changed at run-time.
115112

116-
*Dynamic check.* The Miri engine could check this dynamically by refusing to
117-
access mutable global memory when computing a const.
113+
*Dynamic check.* The Miri engine checks this dynamically by refusing to access
114+
global memory when computing a const.

0 commit comments

Comments
 (0)