From afd91f8a5698e7767ddfbf90c665c08dcd4f0de0 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 23 Sep 2012 22:25:43 -0700 Subject: Register snapshots. Remove redundant Eq impls, Makefile hacks --- src/libcore/cmp.rs | 79 ------------------------------------------------------ 1 file changed, 79 deletions(-) (limited to 'src/libcore/cmp.rs') diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index 362062e945d..37a8f976d74 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -32,17 +32,6 @@ mod nounittest { * an `le` method, with the others generated from * default implementations. */ - #[cfg(stage0)] - #[lang="ord"] - trait Ord { - pure fn lt(&&other: self) -> bool; - pure fn le(&&other: self) -> bool; - pure fn ge(&&other: self) -> bool; - pure fn gt(&&other: self) -> bool; - } - - #[cfg(stage1)] - #[cfg(stage2)] #[lang="ord"] trait Ord { pure fn lt(other: &self) -> bool; @@ -51,7 +40,6 @@ mod nounittest { pure fn gt(other: &self) -> bool; } - #[cfg(stage0)] #[lang="eq"] /** * Trait for values that can be compared for equality @@ -61,13 +49,6 @@ mod nounittest { * an `eq` method, with the other generated from * a default implementation. */ - trait Eq { - pure fn eq(&&other: self) -> bool; - pure fn ne(&&other: self) -> bool; - } - - #[cfg(stage1)] - #[cfg(stage2)] #[lang="eq"] trait Eq { pure fn eq(other: &self) -> bool; @@ -82,16 +63,6 @@ mod nounittest { #[cfg(test)] mod unittest { #[legacy_exports]; - #[cfg(stage0)] - trait Ord { - pure fn lt(&&other: self) -> bool; - pure fn le(&&other: self) -> bool; - pure fn ge(&&other: self) -> bool; - pure fn gt(&&other: self) -> bool; - } - - #[cfg(stage1)] - #[cfg(stage2)] trait Ord { pure fn lt(other: &self) -> bool; pure fn le(other: &self) -> bool; @@ -99,14 +70,6 @@ mod unittest { pure fn gt(other: &self) -> bool; } - #[cfg(stage0)] - trait Eq { - pure fn eq(&&other: self) -> bool; - pure fn ne(&&other: self) -> bool; - } - - #[cfg(stage1)] - #[cfg(stage2)] trait Eq { pure fn eq(other: &self) -> bool; pure fn ne(other: &self) -> bool; @@ -117,68 +80,26 @@ mod unittest { mod unittest { #[legacy_exports];} -#[cfg(stage0)] -pure fn lt(v1: &T, v2: &T) -> bool { - v1.lt(v2) -} - -#[cfg(stage0)] -pure fn le(v1: &T, v2: &T) -> bool { - v1.lt(v2) || v1.eq(v2) -} - -#[cfg(stage0)] -pure fn eq(v1: &T, v2: &T) -> bool { - v1.eq(v2) -} - -#[cfg(stage0)] -pure fn ne(v1: &T, v2: &T) -> bool { - v1.ne(v2) -} - -#[cfg(stage0)] -pure fn ge(v1: &T, v2: &T) -> bool { - v1.ge(v2) -} - -#[cfg(stage0)] -pure fn gt(v1: &T, v2: &T) -> bool { - v1.gt(v2) -} - -#[cfg(stage1)] -#[cfg(stage2)] pure fn lt(v1: &T, v2: &T) -> bool { (*v1).lt(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn le(v1: &T, v2: &T) -> bool { (*v1).lt(v2) || (*v1).eq(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn eq(v1: &T, v2: &T) -> bool { (*v1).eq(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn ne(v1: &T, v2: &T) -> bool { (*v1).ne(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn ge(v1: &T, v2: &T) -> bool { (*v1).ge(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn gt(v1: &T, v2: &T) -> bool { (*v1).gt(v2) } -- cgit 1.4.1-3-g733a5