about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/libextra/sync.rs10
-rw-r--r--src/libstd/util.rs6
2 files changed, 5 insertions, 11 deletions
diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs
index f01eb7ef2af..a8fcbd521d0 100644
--- a/src/libextra/sync.rs
+++ b/src/libextra/sync.rs
@@ -326,7 +326,7 @@ impl Sem<~[WaitQueue]> {
     // and rwlock_write_mode.
     pub fn access_cond<U>(&self, blk: |c: &Condvar| -> U) -> U {
         do self.access {
-            blk(&Condvar { sem: self, order: Nothing, token: NonCopyable::new() })
+            blk(&Condvar { sem: self, order: Nothing, token: NonCopyable })
         }
     }
 }
@@ -569,7 +569,7 @@ impl RWLock {
                 do task::rekillable {
                     let opt_lock = Just(&self.order_lock);
                     blk(&Condvar { sem: cond.sem, order: opt_lock,
-                                   token: NonCopyable::new() })
+                                   token: NonCopyable })
                 }
             }
         }
@@ -605,7 +605,7 @@ impl RWLock {
             (&self.order_lock).release();
             do (|| {
                 do task::rekillable {
-                    blk(RWLockWriteMode { lock: self, token: NonCopyable::new() })
+                    blk(RWLockWriteMode { lock: self, token: NonCopyable })
                 }
             }).finally {
                 let writer_or_last_reader;
@@ -662,7 +662,7 @@ impl RWLock {
                 }
             }
         }
-        RWLockReadMode { lock: token.lock, token: NonCopyable::new() }
+        RWLockReadMode { lock: token.lock, token: NonCopyable }
     }
 }
 
@@ -682,7 +682,7 @@ impl<'self> RWLockWriteMode<'self> {
         // access lock. See comment in RWLock::write_cond for why.
         blk(&Condvar { sem:        &self.lock.access_lock,
                        order: Just(&self.lock.order_lock),
-                       token: NonCopyable::new() })
+                       token: NonCopyable })
     }
 }
 
diff --git a/src/libstd/util.rs b/src/libstd/util.rs
index 3e44a30e47b..8e939caf756 100644
--- a/src/libstd/util.rs
+++ b/src/libstd/util.rs
@@ -62,12 +62,6 @@ pub fn replace<T>(dest: &mut T, mut src: T) -> T {
 #[unsafe_no_drop_flag]
 pub struct NonCopyable;
 
-impl NonCopyable {
-    // FIXME(#8233) should not be necessary
-    /// Create a new noncopyable token.
-    pub fn new() -> NonCopyable { NonCopyable }
-}
-
 impl Drop for NonCopyable {
     fn drop(&mut self) { }
 }