rust/src/libcore/unit.rs

27 lines
537 B
Rust
Raw Normal View History

/*!
Functions for the unit type.
*/
2012-08-30 12:14:54 -05:00
2012-09-25 14:04:02 -05:00
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
2012-08-30 12:14:54 -05:00
use cmp::{Eq, Ord};
#[cfg(notest)]
impl () : Eq {
pure fn eq(&self, _other: &()) -> bool { true }
pure fn ne(&self, _other: &()) -> bool { false }
}
2012-08-30 12:14:54 -05:00
#[cfg(notest)]
impl () : Ord {
pure fn lt(&self, _other: &()) -> bool { false }
pure fn le(&self, _other: &()) -> bool { true }
pure fn ge(&self, _other: &()) -> bool { true }
pure fn gt(&self, _other: &()) -> bool { false }
}
2012-08-30 12:14:54 -05:00