Skip to content

Commit aee2567

Browse files
committed
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! } ```
2 parents d0451ee + c99409b commit aee2567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Similar to a mutable option type, but friendlier.
2020
*/
2121

2222
pub struct Cell<T> {
23-
value: Option<T>
23+
priv value: Option<T>
2424
}
2525

2626
impl<T:cmp::Eq> cmp::Eq for Cell<T> {

0 commit comments

Comments
 (0)