summary refs log tree commit diff
path: root/src/libcore/tuple.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-28 12:33:00 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-28 12:33:00 -0800
commit8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 (patch)
tree7e3fd944a844a195a0ed1bed8717db07a2d8ccc8 /src/libcore/tuple.rs
parentbe6613e048c889a0aeaff056131c2406259f1fb4 (diff)
downloadrust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.tar.gz
rust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.zip
Register snapshots
Diffstat (limited to 'src/libcore/tuple.rs')
-rw-r--r--src/libcore/tuple.rs93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/libcore/tuple.rs b/src/libcore/tuple.rs
index 33ad2cc903b..78a3e3c8355 100644
--- a/src/libcore/tuple.rs
+++ b/src/libcore/tuple.rs
@@ -95,18 +95,6 @@ impl<A: Copy, B: Copy> (~[A], ~[B]): ExtendedTupleOps<A,B> {
 }
 
 impl<A: Eq, B: Eq> (A, B) : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &(A, B)) -> bool {
-        match self {
-            (ref self_a, ref self_b) => match other {
-                &(ref other_a, ref other_b) => {
-                    (*self_a).eq(other_a) && (*self_b).eq(other_b)
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &(A, B)) -> bool {
         match (*self) {
             (ref self_a, ref self_b) => match other {
@@ -116,31 +104,10 @@ impl<A: Eq, B: Eq> (A, B) : Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &(A, B)) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &(A, B)) -> bool { !(*self).eq(other) }
 }
 
 impl<A: Ord, B: Ord> (A, B) : Ord {
-    #[cfg(stage0)]
-    pure fn lt(other: &(A, B)) -> bool {
-        match self {
-            (ref self_a, ref self_b) => {
-                match (*other) {
-                    (ref other_a, ref other_b) => {
-                        if (*self_a).lt(other_a) { return true; }
-                        if (*other_a).lt(self_a) { return false; }
-                        if (*self_b).lt(other_b) { return true; }
-                        return false;
-                    }
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn lt(&self, other: &(A, B)) -> bool {
         match (*self) {
             (ref self_a, ref self_b) => {
@@ -155,37 +122,12 @@ impl<A: Ord, B: Ord> (A, B) : Ord {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn le(other: &(A, B)) -> bool { !(*other).lt(&self) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn le(&self, other: &(A, B)) -> bool { !(*other).lt(&(*self)) }
-    #[cfg(stage0)]
-    pure fn ge(other: &(A, B)) -> bool { !self.lt(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ge(&self, other: &(A, B)) -> bool { !(*self).lt(other) }
-    #[cfg(stage0)]
-    pure fn gt(other: &(A, B)) -> bool { (*other).lt(&self)  }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn gt(&self, other: &(A, B)) -> bool { (*other).lt(&(*self))  }
 }
 
 impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &(A, B, C)) -> bool {
-        match self {
-            (ref self_a, ref self_b, ref self_c) => match other {
-                &(ref other_a, ref other_b, ref other_c) => {
-                    (*self_a).eq(other_a) && (*self_b).eq(other_b)
-                        && (*self_c).eq(other_c)
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &(A, B, C)) -> bool {
         match (*self) {
             (ref self_a, ref self_b, ref self_c) => match other {
@@ -196,33 +138,10 @@ impl<A: Eq, B: Eq, C: Eq> (A, B, C) : Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &(A, B, C)) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &(A, B, C)) -> bool { !(*self).eq(other) }
 }
 
 impl<A: Ord, B: Ord, C: Ord> (A, B, C) : Ord {
-    #[cfg(stage0)]
-    pure fn lt(other: &(A, B, C)) -> bool {
-        match self {
-            (ref self_a, ref self_b, ref self_c) => {
-                match (*other) {
-                    (ref other_a, ref other_b, ref other_c) => {
-                        if (*self_a).lt(other_a) { return true; }
-                        if (*other_a).lt(self_a) { return false; }
-                        if (*self_b).lt(other_b) { return true; }
-                        if (*other_b).lt(self_b) { return false; }
-                        if (*self_c).lt(other_c) { return true; }
-                        return false;
-                    }
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn lt(&self, other: &(A, B, C)) -> bool {
         match (*self) {
             (ref self_a, ref self_b, ref self_c) => {
@@ -239,20 +158,8 @@ impl<A: Ord, B: Ord, C: Ord> (A, B, C) : Ord {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn le(other: &(A, B, C)) -> bool { !(*other).lt(&self) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn le(&self, other: &(A, B, C)) -> bool { !(*other).lt(&(*self)) }
-    #[cfg(stage0)]
-    pure fn ge(other: &(A, B, C)) -> bool { !self.lt(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ge(&self, other: &(A, B, C)) -> bool { !(*self).lt(other) }
-    #[cfg(stage0)]
-    pure fn gt(other: &(A, B, C)) -> bool { (*other).lt(&self)  }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn gt(&self, other: &(A, B, C)) -> bool { (*other).lt(&(*self))  }
 }