Skip to content

Commit

Permalink
Add links to statics chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jan 10, 2020
1 parent 53d0cec commit 18d7140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/items/external-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ parameters and `R` is the declared return type.

## Statics

Statics within external blocks are declared in the same way as statics outside of external blocks,
Statics within external blocks are declared in the same way as [statics] outside of external blocks,
except that they do not have an expression initializing their value.
It is `unsafe` to access a static item declared in an extern block, whether or
not it's mutable, because there is nothing guaranteeing that the bit pattern at the static's
memory is valid for the type it is declared with, since some arbitrary (e.g. C) code is in charge
of initializing the static.

Extern statics can be either immutable or mutable just like statics outside of external blocks.
Extern statics can be either immutable or mutable just like [statics] outside of external blocks.
An immutable static *must* be initialized before any Rust code is executed. It is not enough for
the static to be initialized before Rust code reads from it.

Expand Down

0 comments on commit 18d7140

Please sign in to comment.