auto merge of #6003 : thestinger/rust/cell, r=nikomatsakis

```rust
use core::cell;

fn main() {
    let x = cell::Cell(Some(~"foo"));
    let y = x.value.get_ref().get_ref();
    do x.with_mut_ref |z| { *z = None; }
    println(*y) // boom!
}
```
This commit is contained in:
bors 2013-04-22 10:15:50 -07:00
commit aee2567eca

View File

@ -20,7 +20,7 @@ Similar to a mutable option type, but friendlier.
*/
pub struct Cell<T> {
value: Option<T>
priv value: Option<T>
}
impl<T:cmp::Eq> cmp::Eq for Cell<T> {