summaryrefslogtreecommitdiffstats
path: root/tests/ui/coherence/coherence-impl-in-fn.rs
blob: b97197317488c68c1f1561e81550ed6dc6ef374a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]

pub fn main() {
    #[derive(Copy, Clone)]
    enum x { foo }
    impl ::std::cmp::PartialEq for x {
        fn eq(&self, other: &x) -> bool {
            (*self) as isize == (*other) as isize
        }
        fn ne(&self, other: &x) -> bool { !(*self).eq(other) }
    }
}