From 8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 28 Nov 2012 12:33:00 -0800 Subject: Register snapshots --- src/libcore/tuple.rs | 93 ---------------------------------------------------- 1 file changed, 93 deletions(-) (limited to 'src/libcore/tuple.rs') 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], ~[B]): ExtendedTupleOps { } impl (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, 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, 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, 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, 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, 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, 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, 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)) } } -- cgit 1.4.1-3-g733a5