diff options
Diffstat (limited to 'src/libcore/cmp.rs')
| -rw-r--r-- | src/libcore/cmp.rs | 79 |
1 files changed, 0 insertions, 79 deletions
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<T: Ord>(v1: &T, v2: &T) -> bool { - v1.lt(v2) -} - -#[cfg(stage0)] -pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool { - v1.lt(v2) || v1.eq(v2) -} - -#[cfg(stage0)] -pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool { - v1.eq(v2) -} - -#[cfg(stage0)] -pure fn ne<T: Eq>(v1: &T, v2: &T) -> bool { - v1.ne(v2) -} - -#[cfg(stage0)] -pure fn ge<T: Ord>(v1: &T, v2: &T) -> bool { - v1.ge(v2) -} - -#[cfg(stage0)] -pure fn gt<T: Ord>(v1: &T, v2: &T) -> bool { - v1.gt(v2) -} - -#[cfg(stage1)] -#[cfg(stage2)] pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool { (*v1).lt(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool { (*v1).lt(v2) || (*v1).eq(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool { (*v1).eq(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn ne<T: Eq>(v1: &T, v2: &T) -> bool { (*v1).ne(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn ge<T: Ord>(v1: &T, v2: &T) -> bool { (*v1).ge(v2) } -#[cfg(stage1)] -#[cfg(stage2)] pure fn gt<T: Ord>(v1: &T, v2: &T) -> bool { (*v1).gt(v2) } |
