about summary refs log tree commit diff
path: root/src/libcore/owned.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/owned.rs')
-rw-r--r--src/libcore/owned.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libcore/owned.rs b/src/libcore/owned.rs
index 1d5dd8eca87..62fffde7f16 100644
--- a/src/libcore/owned.rs
+++ b/src/libcore/owned.rs
@@ -7,14 +7,38 @@
 use cmp::{Eq, Ord};
 
 impl<T:Eq> ~const T : Eq {
+    #[cfg(stage0)]
     pure fn eq(other: &~const T) -> bool { *self == *(*other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn eq(&self, other: &~const T) -> bool { *(*self) == *(*other) }
+    #[cfg(stage0)]
     pure fn ne(other: &~const T) -> bool { *self != *(*other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn ne(&self, other: &~const T) -> bool { *(*self) != *(*other) }
 }
 
 impl<T:Ord> ~const T : Ord {
+    #[cfg(stage0)]
     pure fn lt(other: &~const T) -> bool { *self < *(*other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn lt(&self, other: &~const T) -> bool { *(*self) < *(*other) }
+    #[cfg(stage0)]
     pure fn le(other: &~const T) -> bool { *self <= *(*other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn le(&self, other: &~const T) -> bool { *(*self) <= *(*other) }
+    #[cfg(stage0)]
     pure fn ge(other: &~const T) -> bool { *self >= *(*other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn ge(&self, other: &~const T) -> bool { *(*self) >= *(*other) }
+    #[cfg(stage0)]
     pure fn gt(other: &~const T) -> bool { *self > *(*other) }
+    #[cfg(stage1)]
+    #[cfg(stage2)]
+    pure fn gt(&self, other: &~const T) -> bool { *(*self) > *(*other) }
 }