Skip to content

Commit a5af895

Browse files
committed
---
yaml --- r: 23534 b: refs/heads/master c: 180202f h: refs/heads/master v: v3
1 parent eee7579 commit a5af895

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 0c6e470a257fc546555aa10ededded4a77460a71
2+
refs/heads/master: 180202fa4d5db2b32216f35ec9a8b3c05252efc1
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/cmp.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ trait Eq {
1616
pure fn eq(&&other: self) -> bool;
1717
}
1818

19+
#[cfg(notest)]
1920
pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
2021
v1.lt(*v2)
2122
}
2223

24+
#[cfg(notest)]
2325
pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool {
2426
v1.lt(*v2) || v1.eq(*v2)
2527
}
2628

29+
#[cfg(notest)]
2730
pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool {
2831
v1.eq(*v2)
2932
}

trunk/src/libcore/int-template.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import T = inst::T;
2-
import cmp::{Eq, Ord};
32
import num::from_int;
43

54
export min_value, max_value;
@@ -63,19 +62,23 @@ pure fn abs(i: T) -> T {
6362
if is_negative(i) { -i } else { i }
6463
}
6564

66-
impl T: Ord {
67-
pure fn lt(&&other: T) -> bool {
68-
return self < other;
65+
#[cfg(notest)]
66+
mod impls {
67+
import cmp::{Eq, Ord};
68+
69+
impl T: Ord {
70+
pure fn lt(&&other: T) -> bool {
71+
return self < other;
72+
}
6973
}
70-
}
7174

72-
impl T: Eq {
73-
pure fn eq(&&other: T) -> bool {
74-
return self == other;
75+
impl T: Eq {
76+
pure fn eq(&&other: T) -> bool {
77+
return self == other;
78+
}
7579
}
7680
}
7781

78-
7982
impl T: num::Num {
8083
pure fn add(&&other: T) -> T { return self + other; }
8184
pure fn sub(&&other: T) -> T { return self - other; }

trunk/src/libcore/uint-template.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import T = inst::T;
2-
import cmp::{Eq, Ord};
32

43
export min_value, max_value;
54
export min, max;
@@ -56,15 +55,20 @@ pure fn compl(i: T) -> T {
5655
max_value ^ i
5756
}
5857

59-
impl T: Ord {
60-
pure fn lt(&&other: T) -> bool {
61-
return self < other;
58+
#[cfg(notest)]
59+
mod impls {
60+
import cmp::{Eq, Ord};
61+
62+
impl T: Ord {
63+
pure fn lt(&&other: T) -> bool {
64+
return self < other;
65+
}
6266
}
63-
}
6467

65-
impl T: Eq {
66-
pure fn eq(&&other: T) -> bool {
67-
return self == other;
68+
impl T: Eq {
69+
pure fn eq(&&other: T) -> bool {
70+
return self == other;
71+
}
6872
}
6973
}
7074

0 commit comments

Comments
 (0)