File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1950,9 +1950,9 @@ const E: &'static Cell<usize> = &D.a; // error
1950
1950
const F: &'static C = &D; // error
1951
1951
```
1952
1952
1953
- This is because cell types internally use `UnsafeCell`, which isn't `Sync`.
1954
- These aren 't thread safe, and thus can't be placed in statics. In this case,
1955
- `StaticMutex` would work just fine, but it isn't stable yet:
1953
+ This is because cell types do operations that are not thread-safe. Due to this,
1954
+ they don 't implement Sync and thus can't be placed in statics. In this
1955
+ case, `StaticMutex` would work just fine, but it isn't stable yet:
1956
1956
https://doc.rust-lang.org/nightly/std/sync/struct.StaticMutex.html
1957
1957
1958
1958
However, if you still wish to use these types, you can achieve this by an unsafe
You can’t perform that action at this time.
0 commit comments