summary refs log tree commit diff
path: root/src/test/run-pass/coherence-impl-in-fn.rs
blob: a911bc77d98423137aa66f1cb3b3e46b22f0ac55 (plain)
1
2
3
4
5
6
7
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) }
    }
}