mirror of https://github.com/rust-lang/book
Fixed statement about static and Sync
This commit is contained in:
parent
ebf3dc334a
commit
1034a3477b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue