about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-01-30 13:36:41 -0800
committerbors <bors@rust-lang.org>2014-01-30 13:36:41 -0800
commitb3003e1e1af8ee5ca74458787f5eb8c565a47e1d (patch)
tree468dce881317bb3d9521d94ffeb098ac4e9fbaad /src/libextra
parent3427137f667e7def78f12a69af7d8beb2fcd5e65 (diff)
parentf17d972014625eae13ac6d7fe98ff82a110a14d3 (diff)
downloadrust-b3003e1e1af8ee5ca74458787f5eb8c565a47e1d.tar.gz
rust-b3003e1e1af8ee5ca74458787f5eb8c565a47e1d.zip
auto merge of #11895 : xales/rust/libstd, r=alexcrichton
Fixes #11814
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/arc.rs5
-rw-r--r--src/libextra/sync.rs5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs
index 7aa65713466..1c6c3adf972 100644
--- a/src/libextra/arc.rs
+++ b/src/libextra/arc.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -47,7 +47,6 @@ use sync::{Mutex, RWLock};
 use std::cast;
 use std::sync::arc::UnsafeArc;
 use std::task;
-use std::borrow;
 
 /// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
 pub struct Condvar<'a> {
@@ -465,7 +464,7 @@ impl<T:Freeze + Send> RWArc<T> {
             // of this cast is removing the mutability.)
             let new_data = data;
             // Downgrade ensured the token belonged to us. Just a sanity check.
-            assert!(borrow::ref_eq(&(*state).data, new_data));
+            assert!((&(*state).data as *T as uint) == (new_data as *mut T as uint));
             // Produce new token
             RWReadMode {
                 data: new_data,
diff --git a/src/libextra/sync.rs b/src/libextra/sync.rs
index b2ab27d4a8c..26a555a646c 100644
--- a/src/libextra/sync.rs
+++ b/src/libextra/sync.rs
@@ -1,4 +1,4 @@
-// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -18,7 +18,6 @@
  */
 
 
-use std::borrow;
 use std::comm;
 use std::unstable::sync::Exclusive;
 use std::sync::arc::UnsafeArc;
@@ -634,7 +633,7 @@ impl RWLock {
     /// To be called inside of the write_downgrade block.
     pub fn downgrade<'a>(&self, token: RWLockWriteMode<'a>)
                          -> RWLockReadMode<'a> {
-        if !borrow::ref_eq(self, token.lock) {
+        if !((self as *RWLock) == (token.lock as *RWLock)) {
             fail!("Can't downgrade() with a different rwlock's write_mode!");
         }
         unsafe {