about summary refs log tree commit diff
path: root/src/libstd/gc.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-04-30 22:00:31 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-05-07 08:15:58 -0700
commitc5229e5d2ea6168ec80a7feeea1a513b2b3176c0 (patch)
tree479726fbafd85d1dd0549e3707882d44ea4dfd74 /src/libstd/gc.rs
parent5592a8f5db52a11b63547b661b3a635655b16980 (diff)
downloadrust-c5229e5d2ea6168ec80a7feeea1a513b2b3176c0.tar.gz
rust-c5229e5d2ea6168ec80a7feeea1a513b2b3176c0.zip
core: Inhert ~/@/& cmp traits, remove old modules
This commit removes the std::{managed, reference} modules. The modules serve
essentially no purpose, and the only free function removed was `managed::ptr_eq`
which can be achieved by comparing references.

[breaking-change]
Diffstat (limited to 'src/libstd/gc.rs')
-rw-r--r--src/libstd/gc.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs
index 7387eff3dfc..9260d8d7ab2 100644
--- a/src/libstd/gc.rs
+++ b/src/libstd/gc.rs
@@ -20,7 +20,6 @@ collector is task-local so `Gc<T>` is not sendable.
 
 use kinds::marker;
 use clone::Clone;
-use managed;
 
 /// Immutable garbage-collected pointer type
 #[lang="gc"]
@@ -55,7 +54,7 @@ impl<T: 'static> Gc<T> {
     /// Determine if two garbage-collected boxes point to the same object
     #[inline]
     pub fn ptr_eq(&self, other: &Gc<T>) -> bool {
-        managed::ptr_eq(self.ptr, other.ptr)
+        self.borrow() as *T == other.borrow() as *T
     }
 }