Skip to content

Commit 8c92cb1

Browse files
committed
---
yaml --- r: 36508 b: refs/heads/try2 c: b52a4b4 h: refs/heads/master v: v3
1 parent 380bfd1 commit 8c92cb1

File tree

30 files changed

+216
-222
lines changed

30 files changed

+216
-222
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
55
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 3ed9fbd63c6a3c6226bc466786e6d3c1bfec856d
8+
refs/heads/try2: b52a4b412e515620c2c3ccbe8b7f8c7e0300f6ff
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
1010
refs/heads/dist-snap: 22efa39382d41b084fde1719df7ae8ce5697d8c9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try2/src/libcore/bool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ pub fn all_values(blk: fn(v: bool)) {
6565
/// converts truth value to an 8 bit byte
6666
pub pure fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
6767

68+
#[cfg(notest)]
6869
impl bool : cmp::Eq {
6970
pure fn eq(&self, other: &bool) -> bool { (*self) == (*other) }
7071
pure fn ne(&self, other: &bool) -> bool { (*self) != (*other) }

branches/try2/src/libcore/box.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ pub pure fn ptr_eq<T>(a: @T, b: @T) -> bool {
2727
unsafe { ptr::addr_of(&(*a)) == ptr::addr_of(&(*b)) }
2828
}
2929

30+
#[cfg(notest)]
3031
impl<T:Eq> @const T : Eq {
3132
pure fn eq(&self, other: &@const T) -> bool { *(*self) == *(*other) }
3233
pure fn ne(&self, other: &@const T) -> bool { *(*self) != *(*other) }
3334
}
3435

36+
#[cfg(notest)]
3537
impl<T:Ord> @const T : Ord {
3638
pure fn lt(&self, other: &@const T) -> bool { *(*self) < *(*other) }
3739
pure fn le(&self, other: &@const T) -> bool { *(*self) <= *(*other) }

branches/try2/src/libcore/char.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ pub pure fn cmp(a: char, b: char) -> int {
180180
else { 0 }
181181
}
182182

183+
#[cfg(notest)]
183184
impl char : Eq {
184185
pure fn eq(&self, other: &char) -> bool { (*self) == (*other) }
185186
pure fn ne(&self, other: &char) -> bool { (*self) != (*other) }

branches/try2/src/libcore/cmp.rs

Lines changed: 25 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -14,70 +14,35 @@ and `Eq` to overload the `==` and `!=` operators.
1414
#[forbid(deprecated_mode)];
1515
#[forbid(deprecated_pattern)];
1616

17-
pub use nounittest::*;
18-
pub use unittest::*;
19-
20-
/// Interfaces used for comparison.
21-
22-
// Awful hack to work around duplicate lang items in core test.
23-
#[cfg(notest)]
24-
mod nounittest {
25-
/**
26-
* Trait for values that can be compared for a sort-order.
27-
*
28-
* Eventually this may be simplified to only require
29-
* an `le` method, with the others generated from
30-
* default implementations.
31-
*/
32-
#[lang="ord"]
33-
pub trait Ord {
34-
pure fn lt(&self, other: &self) -> bool;
35-
pure fn le(&self, other: &self) -> bool;
36-
pure fn ge(&self, other: &self) -> bool;
37-
pure fn gt(&self, other: &self) -> bool;
38-
}
39-
40-
#[lang="eq"]
41-
/**
42-
* Trait for values that can be compared for equality
43-
* and inequality.
44-
*
45-
* Eventually this may be simplified to only require
46-
* an `eq` method, with the other generated from
47-
* a default implementation.
48-
*/
49-
#[lang="eq"]
50-
pub trait Eq {
51-
pure fn eq(&self, other: &self) -> bool;
52-
pure fn ne(&self, other: &self) -> bool;
53-
}
17+
/**
18+
* Trait for values that can be compared for equality
19+
* and inequality.
20+
*
21+
* Eventually this may be simplified to only require
22+
* an `eq` method, with the other generated from
23+
* a default implementation.
24+
*/
25+
#[lang="eq"]
26+
pub trait Eq {
27+
pure fn eq(&self, other: &self) -> bool;
28+
pure fn ne(&self, other: &self) -> bool;
5429
}
5530

56-
#[cfg(test)]
57-
mod nounittest {
58-
#[legacy_exports];}
59-
60-
#[cfg(test)]
61-
mod unittest {
62-
#[legacy_exports];
63-
64-
pub trait Ord {
65-
pure fn lt(&self, other: &self) -> bool;
66-
pure fn le(&self, other: &self) -> bool;
67-
pure fn ge(&self, other: &self) -> bool;
68-
pure fn gt(&self, other: &self) -> bool;
69-
}
70-
71-
pub trait Eq {
72-
pure fn eq(&self, other: &self) -> bool;
73-
pure fn ne(&self, other: &self) -> bool;
74-
}
31+
/**
32+
* Trait for values that can be compared for a sort-order.
33+
*
34+
* Eventually this may be simplified to only require
35+
* an `le` method, with the others generated from
36+
* default implementations.
37+
*/
38+
#[lang="ord"]
39+
pub trait Ord {
40+
pure fn lt(&self, other: &self) -> bool;
41+
pure fn le(&self, other: &self) -> bool;
42+
pure fn ge(&self, other: &self) -> bool;
43+
pure fn gt(&self, other: &self) -> bool;
7544
}
7645

77-
#[cfg(notest)]
78-
mod unittest {
79-
#[legacy_exports];}
80-
8146
pub pure fn lt<T: Ord>(v1: &T, v2: &T) -> bool {
8247
(*v1).lt(v2)
8348
}

0 commit comments

Comments
 (0)