about summary refs log tree commit diff
path: root/src/libstd/ptr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/ptr.rs')
-rw-r--r--src/libstd/ptr.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libstd/ptr.rs b/src/libstd/ptr.rs
index 179100255c4..504c613bf4c 100644
--- a/src/libstd/ptr.rs
+++ b/src/libstd/ptr.rs
@@ -19,7 +19,7 @@ use mem;
 use option::{Option, Some, None};
 use intrinsics;
 
-#[cfg(not(test))] use cmp::{Eq, Ord};
+#[cfg(not(test))] use cmp::{Eq, TotalEq, Ord};
 
 /// Return the offset of the first null pointer in `buf`.
 #[inline]
@@ -273,6 +273,9 @@ impl<T> Eq for *T {
 }
 
 #[cfg(not(test))]
+impl<T> TotalEq for *T {}
+
+#[cfg(not(test))]
 impl<T> Eq for *mut T {
     #[inline]
     fn eq(&self, other: &*mut T) -> bool {
@@ -282,6 +285,9 @@ impl<T> Eq for *mut T {
     fn ne(&self, other: &*mut T) -> bool { !self.eq(other) }
 }
 
+#[cfg(not(test))]
+impl<T> TotalEq for *mut T {}
+
 // Equivalence for pointers
 #[cfg(not(test))]
 impl<T> Equiv<*mut T> for *T {