Skip to content

Commit a6bb4a0

Browse files
committed
auto merge of #5292 : thestinger/rust/nil, r=graydon
2 parents f4dba95 + 80c71c8 commit a6bb4a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/libcore/nil.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Functions for the unit type.
1515
*/
1616

1717
#[cfg(notest)]
18-
use cmp::{Eq, Ord};
18+
use cmp::{Eq, Ord, TotalOrd, Ordering, Equal};
1919

2020
#[cfg(notest)]
2121
impl Eq for () {
@@ -37,3 +37,8 @@ impl Ord for () {
3737
pure fn gt(&self, _other: &()) -> bool { false }
3838
}
3939

40+
#[cfg(notest)]
41+
impl TotalOrd for () {
42+
#[inline(always)]
43+
pure fn cmp(&self, _other: &()) -> Ordering { Equal }
44+
}

0 commit comments

Comments
 (0)