diff options
| author | bors <bors@rust-lang.org> | 2014-03-22 13:01:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-22 13:01:52 -0700 |
| commit | 7e7a5e3d3eabe0ee46474b0eb701c159a45b490f (patch) | |
| tree | 70ed4399cd98654d6ba75b4251b8478868ab063a /src/libstd/cell.rs | |
| parent | 0e6f90eb89021342935de9af2f014fbee5805855 (diff) | |
| parent | a1cb2f5d8c4ce807b27b09344b5ef7d9cd94c04d (diff) | |
auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichton
This PR removes the `Freeze` kind and the `NoFreeze` marker completely. Fixes #12577 cc @nikomatsakis r?
Diffstat (limited to 'src/libstd/cell.rs')
| -rw-r--r-- | src/libstd/cell.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/libstd/cell.rs b/src/libstd/cell.rs index d09b31faa25..e0912b826cd 100644 --- a/src/libstd/cell.rs +++ b/src/libstd/cell.rs @@ -22,8 +22,7 @@ use ty::Unsafe; /// A mutable memory location that admits only `Pod` data. pub struct Cell<T> { priv value: Unsafe<T>, - priv marker1: marker::NoFreeze, - priv marker2: marker::NoShare, + priv noshare: marker::NoShare, } impl<T:Pod> Cell<T> { @@ -31,8 +30,7 @@ impl<T:Pod> Cell<T> { pub fn new(value: T) -> Cell<T> { Cell { value: Unsafe::new(value), - marker1: marker::NoFreeze, - marker2: marker::NoShare, + noshare: marker::NoShare, } } @@ -73,9 +71,8 @@ impl<T: fmt::Show> fmt::Show for Cell<T> { pub struct RefCell<T> { priv value: Unsafe<T>, priv borrow: BorrowFlag, - priv marker1: marker::NoFreeze, - priv marker2: marker::NoPod, - priv marker3: marker::NoShare, + priv nopod: marker::NoPod, + priv noshare: marker::NoShare, } // Values [1, MAX-1] represent the number of `Ref` active @@ -88,10 +85,9 @@ impl<T> RefCell<T> { /// Create a new `RefCell` containing `value` pub fn new(value: T) -> RefCell<T> { RefCell { - marker1: marker::NoFreeze, - marker2: marker::NoPod, - marker3: marker::NoShare, value: Unsafe::new(value), + nopod: marker::NoPod, + noshare: marker::NoShare, borrow: UNUSED, } } |
