rust/src/test/run-pass/coherence-impl-in-fn.rs
2012-09-20 09:48:05 -07:00

8 lines
199 B
Rust

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