1
Fork 0

Update Freeze information

This commit is contained in:
Corey Richardson 2013-12-10 09:26:43 -05:00
parent fab5624eb6
commit c8f47db8f5

View file

@ -1431,7 +1431,8 @@ For a more in-depth explanation of borrowed pointers, read the
## Freezing
Lending an immutable pointer to an object freezes it and prevents mutation.
`Owned` objects have freezing enforced statically at compile-time.
`Freeze` objects have freezing enforced statically at compile-time. Examples
of non-`Freeze` types are `@mut` and [`RefCell<T>`][refcell].
~~~~
let mut x = 5;
@ -1456,6 +1457,8 @@ let y = x;
// the box is now unfrozen again
~~~~
[refcell]: http://static.rust-lang.org/doc/master/std/cell/struct.RefCell.html
# Dereferencing pointers
Rust uses the unary star operator (`*`) to access the contents of a