about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-05-16 10:15:33 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-11 09:51:37 -0700
commit54c2a1e1ce7f32576f0692a1de3fe2763d13bac9 (patch)
tree62c34c3c945986ccb3e409df57ed0579a2ddcf9a /src/libstd
parent53ad426e92f8099a701f3f54c02dc8f069f5939a (diff)
downloadrust-54c2a1e1ce7f32576f0692a1de3fe2763d13bac9.tar.gz
rust-54c2a1e1ce7f32576f0692a1de3fe2763d13bac9.zip
rustc: Move the AST from @T to Gc<T>
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/gc.rs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs
index 7988735e80f..b57920e002c 100644
--- a/src/libstd/gc.rs
+++ b/src/libstd/gc.rs
@@ -19,11 +19,10 @@ collector is task-local so `Gc<T>` is not sendable.
 #![allow(experimental)]
 
 use clone::Clone;
-use cmp::{TotalOrd, Ord, Ordering, TotalEq, Eq};
+use cmp::{Ord, PartialOrd, Ordering, Eq, PartialEq};
 use default::Default;
 use fmt;
-use hash::Hash;
-use io::Writer;
+use hash;
 use kinds::marker;
 use ops::Deref;
 use raw;
@@ -37,11 +36,11 @@ pub struct Gc<T> {
     #[cfg(stage0)]
     ptr: @T,
     #[cfg(not(stage0))]
-    ptr: *T,
+    _ptr: *T,
     marker: marker::NoSend,
 }
 
-impl<T: 'static> Clone for Gc<T> {
+impl<T> Clone for Gc<T> {
     /// Clone the pointer only
     #[inline]
     fn clone(&self) -> Gc<T> { *self }
@@ -54,13 +53,13 @@ impl<T: 'static> Clone for Gc<T> {
 #[cfg(not(test))]
 pub static GC: () = ();
 
-impl<T: Eq + 'static> Eq for Gc<T> {
+impl<T: PartialEq + 'static> PartialEq for Gc<T> {
     #[inline]
     fn eq(&self, other: &Gc<T>) -> bool { *(*self) == *(*other) }
     #[inline]
     fn ne(&self, other: &Gc<T>) -> bool { *(*self) != *(*other) }
 }
-impl<T: Ord + 'static> Ord for Gc<T> {
+impl<T: PartialOrd + 'static> PartialOrd for Gc<T> {
     #[inline]
     fn lt(&self, other: &Gc<T>) -> bool { *(*self) < *(*other) }
     #[inline]
@@ -70,11 +69,11 @@ impl<T: Ord + 'static> Ord for Gc<T> {
     #[inline]
     fn gt(&self, other: &Gc<T>) -> bool { *(*self) > *(*other) }
 }
-impl<T: TotalOrd + 'static> TotalOrd for Gc<T> {
+impl<T: Ord + 'static> Ord for Gc<T> {
     #[inline]
     fn cmp(&self, other: &Gc<T>) -> Ordering { (**self).cmp(&**other) }
 }
-impl<T: TotalEq + 'static> TotalEq for Gc<T> {}
+impl<T: Eq + 'static> Eq for Gc<T> {}
 
 impl<T: 'static> Deref<T> for Gc<T> {
     #[cfg(stage0)]
@@ -91,7 +90,7 @@ impl<T: Default + 'static> Default for Gc<T> {
 
 impl<T: 'static> raw::Repr<*raw::Box<T>> for Gc<T> {}
 
-impl<S: Writer, T: Hash<S> + 'static> Hash<S> for Gc<T> {
+impl<S: hash::Writer, T: hash::Hash<S> + 'static> hash::Hash<S> for Gc<T> {
     fn hash(&self, s: &mut S) {
         (**self).hash(s)
     }