Skip to content

Commit 3f62399

Browse files
committed
tweak
1 parent 748ad2b commit 3f62399

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

const.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,14 @@ ecosystem that would break if we just started enforcing this now. See
8080
[this issue](https://github.com/rust-lang/rust/issues/49206) and the
8181
[PR attempting to fix this](https://github.com/rust-lang/rust/pull/54424/).
8282

83-
Also, one could make the argument that the value does not have to be `Send`
84-
because it is not actually sent to other threads; instead, conceptually, each
85-
thread re-does the same computation. But we know they will all come to the same
83+
One could make the argument that the value does not have to be `Send` because it
84+
is not actually sent to other threads; instead, conceptually, each thread
85+
re-does the same computation. But we know they will all come to the same
8686
result. This works, except when we consider address identity: with references
8787
in the `const`, all threads will get the same address, unlike in case of a
88-
per-thread recomputation which would lead to different addresses.
88+
per-thread recomputation which would lead to different addresses. As a
89+
consequence, non-`Send` `const` without references are fine, but once references
90+
and thus address identity comes into play, we have a problem.
8991

9092
*Dynamic check.* It is unclear how the Miri engine could dynamically check this.
9193

0 commit comments

Comments
 (0)