Skip to content

Commit

Permalink
Auto merge of #30111 - GuillaumeGomez:patch-3, r=Manishearth
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Nov 30, 2015
2 parents 52d95e6 + 1099af7 commit fd2626c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1950,9 +1950,9 @@ const E: &'static Cell<usize> = &D.a; // error
const F: &'static C = &D; // error
```
This is because cell types internally use `UnsafeCell`, which isn't `Sync`.
These aren't thread safe, and thus can't be placed in statics. In this case,
`StaticMutex` would work just fine, but it isn't stable yet:
This is because cell types do operations that are not thread-safe. Due to this,
they don't implement Sync and thus can't be placed in statics. In this
case, `StaticMutex` would work just fine, but it isn't stable yet:
https://doc.rust-lang.org/nightly/std/sync/struct.StaticMutex.html
However, if you still wish to use these types, you can achieve this by an unsafe
Expand Down

0 comments on commit fd2626c

Please sign in to comment.