mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
libcore: Add missing unit.rs
This commit is contained in:
parent
a1c11cab2d
commit
45e46f5fc0
17
src/libcore/unit.rs
Normal file
17
src/libcore/unit.rs
Normal file
@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Functions for the unit type.
|
||||
*/
|
||||
|
||||
use cmp::{Eq, Ord};
|
||||
|
||||
impl () : Eq {
|
||||
pure fn eq(&&_other: ()) -> bool { true }
|
||||
}
|
||||
|
||||
impl () : Ord {
|
||||
pure fn lt(&&_other: ()) -> bool { false }
|
||||
pure fn le(&&_other: ()) -> bool { true }
|
||||
pure fn ge(&&_other: ()) -> bool { true }
|
||||
pure fn gt(&&_other: ()) -> bool { false }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user