mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 21:47:15 +03:00
19 lines
378 B
Rust
19 lines
378 B
Rust
/**
|
|
* Functions for the unit type.
|
|
*/
|
|
|
|
use cmp::{Eq, Ord};
|
|
|
|
impl () : Eq {
|
|
pure fn eq(&&_other: ()) -> bool { true }
|
|
pure fn ne(&&_other: ()) -> bool { false }
|
|
}
|
|
|
|
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 }
|
|
}
|
|
|