Add info about usage of 'unsafe' keyword in bindings to foreign interfaces.

This commit is contained in:
Ticki 2015-07-21 21:36:29 +02:00
parent 5dbddfb210
commit a5c7b96426

View file

@ -100,10 +100,14 @@ that you normally can not do. Just three. Here they are:
Thats it. Its important that `unsafe` does not, for example, turn off the
borrow checker. Adding `unsafe` to some random Rust code doesnt change its
semantics, it wont just start accepting anything.
semantics, it wont just start accepting anything. But it will let you write
things that _do_ break some of the rules.
But it will let you write things that _do_ break some of the rules. Lets go
over these three abilities in order.
You will also encounter the 'unsafe' keyword when writing bindings to foreign
(non-Rust) interfaces. You're encouraged to write a safe, native Rust interface
around the methods provided by the library.
Lets go over the basic three abilities listed, in order.
## Access or update a `static mut`