rust/src/libcore/unit.rs

18 lines
331 B
Rust
Raw Normal View History

2012-08-30 12:14:54 -05:00
/**
* 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 }
}