about summary refs log tree commit diff
path: root/src/libsync
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-03-22 13:01:52 -0700
committerbors <bors@rust-lang.org>2014-03-22 13:01:52 -0700
commit7e7a5e3d3eabe0ee46474b0eb701c159a45b490f (patch)
tree70ed4399cd98654d6ba75b4251b8478868ab063a /src/libsync
parent0e6f90eb89021342935de9af2f014fbee5805855 (diff)
parenta1cb2f5d8c4ce807b27b09344b5ef7d9cd94c04d (diff)
downloadrust-7e7a5e3d3eabe0ee46474b0eb701c159a45b490f.tar.gz
rust-7e7a5e3d3eabe0ee46474b0eb701c159a45b490f.zip
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/libsync')
-rw-r--r--src/libsync/arc.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/libsync/arc.rs b/src/libsync/arc.rs
index 0659e79433a..57187e27323 100644
--- a/src/libsync/arc.rs
+++ b/src/libsync/arc.rs
@@ -162,7 +162,6 @@ struct MutexArcInner<T> { lock: Mutex, failed: bool, data: T }
 /// An Arc with mutable data protected by a blocking mutex.
 pub struct MutexArc<T> {
     priv x: UnsafeArc<MutexArcInner<T>>,
-    priv marker: marker::NoFreeze,
 }
 
 impl<T:Send> Clone for MutexArc<T> {
@@ -171,8 +170,7 @@ impl<T:Send> Clone for MutexArc<T> {
     fn clone(&self) -> MutexArc<T> {
         // NB: Cloning the underlying mutex is not necessary. Its reference
         // count would be exactly the same as the shared state's.
-        MutexArc { x: self.x.clone(),
-                   marker: marker::NoFreeze, }
+        MutexArc { x: self.x.clone() }
     }
 }
 
@@ -191,8 +189,7 @@ impl<T:Send> MutexArc<T> {
             lock: Mutex::new_with_condvars(num_condvars),
             failed: false, data: user_data
         };
-        MutexArc { x: UnsafeArc::new(data),
-                   marker: marker::NoFreeze, }
+        MutexArc { x: UnsafeArc::new(data) }
     }
 
     /**
@@ -297,17 +294,17 @@ struct RWArcInner<T> { lock: RWLock, failed: bool, data: T }
  */
 pub struct RWArc<T> {
     priv x: UnsafeArc<RWArcInner<T>>,
-    priv marker: marker::NoFreeze,
-    priv marker1: marker::NoShare,
+    priv marker: marker::NoShare,
 }
 
 impl<T: Share + Send> Clone for RWArc<T> {
     /// Duplicate a rwlock-protected Arc. See arc::clone for more details.
     #[inline]
     fn clone(&self) -> RWArc<T> {
-        RWArc { x: self.x.clone(),
-                marker: marker::NoFreeze,
-                marker1: marker::NoShare, }
+        RWArc {
+            x: self.x.clone(),
+            marker: marker::NoShare
+        }
     }
 
 }
@@ -327,9 +324,10 @@ impl<T: Share + Send> RWArc<T> {
             lock: RWLock::new_with_condvars(num_condvars),
             failed: false, data: user_data
         };
-        RWArc { x: UnsafeArc::new(data),
-                marker: marker::NoFreeze,
-                marker1: marker::NoShare, }
+        RWArc {
+            x: UnsafeArc::new(data),
+            marker: marker::NoShare
+        }
     }
 
     /**