Skip to content

Commit 45e46f5

Browse files
committed
libcore: Add missing unit.rs
1 parent a1c11ca commit 45e46f5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/libcore/unit.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Functions for the unit type.
3+
*/
4+
5+
use cmp::{Eq, Ord};
6+
7+
impl () : Eq {
8+
pure fn eq(&&_other: ()) -> bool { true }
9+
}
10+
11+
impl () : Ord {
12+
pure fn lt(&&_other: ()) -> bool { false }
13+
pure fn le(&&_other: ()) -> bool { true }
14+
pure fn ge(&&_other: ()) -> bool { true }
15+
pure fn gt(&&_other: ()) -> bool { false }
16+
}
17+

0 commit comments

Comments
 (0)