Skip to content

Commit b3f52bc

Browse files
committed
---
yaml --- r: 28114 b: refs/heads/try c: 381a628 h: refs/heads/master v: v3
1 parent 06c8e82 commit b3f52bc

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5-
refs/heads/try: 1cd97ee47dacdd96ca34847fb0a5c7e47c7fd9af
5+
refs/heads/try: 381a628c4c49d2cbfabe8a60216809d45e316704
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df

branches/try/src/libcore/cmp.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,37 @@
44

55
/// Interfaces used for comparison.
66
7+
// Awful hack to work around duplicate lang items in core test.
78
#[cfg(notest)]
89
#[lang="ord"]
910
trait Ord {
1011
pure fn lt(&&other: self) -> bool;
1112
}
1213

14+
#[cfg(test)]
15+
trait Ord {
16+
pure fn lt(&&other: self) -> bool;
17+
}
18+
1319
#[cfg(notest)]
1420
#[lang="eq"]
1521
trait Eq {
1622
pure fn eq(&&other: self) -> bool;
1723
}
1824

19-
#[cfg(notest)]
25+
#[cfg(test)]
26+
trait Eq {
27+
pure fn eq(&&other: self) -> bool;
28+
}
29+
2030
pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
2131
v1.lt(*v2)
2232
}
2333

24-
#[cfg(notest)]
2534
pure fn le<T: Ord Eq>(v1: &T, v2: &T) -> bool {
2635
v1.lt(*v2) || v1.eq(*v2)
2736
}
2837

29-
#[cfg(notest)]
3038
pure fn eq<T: Eq>(v1: &T, v2: &T) -> bool {
3139
v1.eq(*v2)
3240
}

branches/try/src/libcore/int-template.rs

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

45
export min_value, max_value;
@@ -62,20 +63,15 @@ pure fn abs(i: T) -> T {
6263
if is_negative(i) { -i } else { i }
6364
}
6465

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-
}
66+
impl T: Ord {
67+
pure fn lt(&&other: T) -> bool {
68+
return self < other;
7369
}
70+
}
7471

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

branches/try/src/libcore/uint-template.rs

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

34
export min_value, max_value;
45
export min, max;
@@ -55,20 +56,15 @@ pure fn compl(i: T) -> T {
5556
max_value ^ i
5657
}
5758

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-
}
59+
impl T: Ord {
60+
pure fn lt(&&other: T) -> bool {
61+
return self < other;
6662
}
63+
}
6764

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

0 commit comments

Comments
 (0)