diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-11-28 12:33:00 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-11-28 12:33:00 -0800 |
| commit | 8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 (patch) | |
| tree | 7e3fd944a844a195a0ed1bed8717db07a2d8ccc8 /src/libstd/deque.rs | |
| parent | be6613e048c889a0aeaff056131c2406259f1fb4 (diff) | |
| download | rust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.tar.gz rust-8179e268efd86ae5c1bcf21b4f8d4e01eea7c193.zip | |
Register snapshots
Diffstat (limited to 'src/libstd/deque.rs')
| -rw-r--r-- | src/libstd/deque.rs | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/src/libstd/deque.rs b/src/libstd/deque.rs index 44ddb307019..f33ff892f36 100644 --- a/src/libstd/deque.rs +++ b/src/libstd/deque.rs @@ -239,25 +239,6 @@ mod tests { type RecCy = {x: int, y: int, t: Taggy}; impl Taggy : Eq { - #[cfg(stage0)] - pure fn eq(other: &Taggy) -> bool { - match self { - One(a1) => match (*other) { - One(b1) => return a1 == b1, - _ => return false - }, - Two(a1, a2) => match (*other) { - Two(b1, b2) => return a1 == b1 && a2 == b2, - _ => return false - }, - Three(a1, a2, a3) => match (*other) { - Three(b1, b2, b3) => return a1 == b1 && a2 == b2 && a3 == b3, - _ => return false - } - } - } - #[cfg(stage1)] - #[cfg(stage2)] pure fn eq(&self, other: &Taggy) -> bool { match (*self) { One(a1) => match (*other) { @@ -274,36 +255,11 @@ mod tests { } } } - #[cfg(stage0)] - pure fn ne(other: &Taggy) -> bool { !self.eq(other) } - #[cfg(stage1)] - #[cfg(stage2)] pure fn ne(&self, other: &Taggy) -> bool { !(*self).eq(other) } } impl Taggypar<int> : Eq { //let eq4: EqFn<Taggypar<int>> = |x,y| taggypareq::<int>(x, y); - #[cfg(stage0)] - pure fn eq(other: &Taggypar<int>) -> bool { - match self { - Onepar::<int>(a1) => match (*other) { - Onepar::<int>(b1) => return a1 == b1, - _ => return false - }, - Twopar::<int>(a1, a2) => match (*other) { - Twopar::<int>(b1, b2) => return a1 == b1 && a2 == b2, - _ => return false - }, - Threepar::<int>(a1, a2, a3) => match (*other) { - Threepar::<int>(b1, b2, b3) => { - return a1 == b1 && a2 == b2 && a3 == b3 - } - _ => return false - } - } - } - #[cfg(stage1)] - #[cfg(stage2)] pure fn eq(&self, other: &Taggypar<int>) -> bool { match (*self) { Onepar::<int>(a1) => match (*other) { @@ -322,33 +278,16 @@ mod tests { } } } - #[cfg(stage0)] - pure fn ne(other: &Taggypar<int>) -> bool { - !self.eq(other) - } - #[cfg(stage1)] - #[cfg(stage2)] pure fn ne(&self, other: &Taggypar<int>) -> bool { !(*self).eq(other) } } impl RecCy : Eq { - #[cfg(stage0)] - pure fn eq(other: &RecCy) -> bool { - return self.x == (*other).x && self.y == (*other).y && - self.t == (*other).t; - } - #[cfg(stage1)] - #[cfg(stage2)] pure fn eq(&self, other: &RecCy) -> bool { return (*self).x == (*other).x && (*self).y == (*other).y && (*self).t == (*other).t; } - #[cfg(stage0)] - pure fn ne(other: &RecCy) -> bool { !self.eq(other) } - #[cfg(stage1)] - #[cfg(stage2)] pure fn ne(&self, other: &RecCy) -> bool { !(*self).eq(other) } } |
