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
19501950const F: &'static C = &D; // error
19511951```
19521952
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:
19561956https://doc.rust-lang.org/nightly/std/sync/struct.StaticMutex.html
19571957
19581958However, 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