Fixed statement about static and Sync

This commit is contained in:
Stephane Raux 2018-01-28 19:43:27 -08:00
parent ebf3dc334a
commit 1034a3477b
1 changed files with 3 additions and 2 deletions

View File

@ -38,6 +38,9 @@ reference stored in a static has a [`'static` lifetime][lifetimes]:
static NAME: &'static str = "Steve";
```
The type of a `static` value must be `Sync` unless the `static` value is
mutable.
[lifetimes]: lifetimes.html
## Mutability
@ -64,8 +67,6 @@ unsafe {
[unsafe]: unsafe.html
Furthermore, any type stored in a `static` must be `Sync`.
# Initializing
Both `const` and `static` have requirements for giving them a value. They must