Skip to content

Commit 034e138

Browse files
committed
cell: Remove Freeze / NoFreeze
1 parent 16e0760 commit 034e138

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/libstd/cell.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,15 @@ use ty::Unsafe;
2222
/// A mutable memory location that admits only `Pod` data.
2323
pub struct Cell<T> {
2424
priv value: Unsafe<T>,
25-
priv marker1: marker::NoFreeze,
26-
priv marker2: marker::NoShare,
25+
priv noshare: marker::NoShare,
2726
}
2827

2928
impl<T:Pod> Cell<T> {
3029
/// Creates a new `Cell` containing the given value.
3130
pub fn new(value: T) -> Cell<T> {
3231
Cell {
3332
value: Unsafe::new(value),
34-
marker1: marker::NoFreeze,
35-
marker2: marker::NoShare,
33+
noshare: marker::NoShare,
3634
}
3735
}
3836

@@ -73,9 +71,8 @@ impl<T: fmt::Show> fmt::Show for Cell<T> {
7371
pub struct RefCell<T> {
7472
priv value: Unsafe<T>,
7573
priv borrow: BorrowFlag,
76-
priv marker1: marker::NoFreeze,
77-
priv marker2: marker::NoPod,
78-
priv marker3: marker::NoShare,
74+
priv nopod: marker::NoPod,
75+
priv noshare: marker::NoShare,
7976
}
8077

8178
// Values [1, MAX-1] represent the number of `Ref` active
@@ -88,10 +85,9 @@ impl<T> RefCell<T> {
8885
/// Create a new `RefCell` containing `value`
8986
pub fn new(value: T) -> RefCell<T> {
9087
RefCell {
91-
marker1: marker::NoFreeze,
92-
marker2: marker::NoPod,
93-
marker3: marker::NoShare,
9488
value: Unsafe::new(value),
89+
nopod: marker::NoPod,
90+
noshare: marker::NoShare,
9591
borrow: UNUSED,
9692
}
9793
}

0 commit comments

Comments
 (0)