rust/src/libcore/unit.rs

21 lines
376 B
Rust
Raw Normal View History

/*!
Functions for the unit type.
*/
2012-08-30 12:14:54 -05:00
use cmp::{Eq, Ord};
impl () : Eq {
pure fn eq(&&_other: ()) -> bool { true }
pure fn ne(&&_other: ()) -> bool { false }
2012-08-30 12:14:54 -05:00
}
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 }
}