2012-08-31 17:10:44 -05:00
|
|
|
fn main() {
|
|
|
|
enum x { foo }
|
|
|
|
impl x : core::cmp::Eq {
|
2012-11-14 20:59:30 -06:00
|
|
|
pure fn eq(&self, other: &x) -> bool {
|
|
|
|
(*self) as int == (*other) as int
|
|
|
|
}
|
|
|
|
pure fn ne(&self, other: &x) -> bool { !(*self).eq(other) }
|
2012-08-31 17:10:44 -05:00
|
|
|
}
|
|
|
|
}
|