10 lines
239 B
Rust
10 lines
239 B
Rust
fn main() {
|
|
enum x { foo }
|
|
impl x : core::cmp::Eq {
|
|
pure fn eq(&self, other: &x) -> bool {
|
|
(*self) as int == (*other) as int
|
|
}
|
|
pure fn ne(&self, other: &x) -> bool { !(*self).eq(other) }
|
|
}
|
|
}
|