4 #![feature(untagged_unions)]
9 use std::hash::{Hash, Hasher};
11 #[derive(PartialEq, Hash)]
14 impl PartialEq<u64> for Foo {
15 fn eq(&self, _: &u64) -> bool { true }
21 impl PartialEq for Bar {
22 fn eq(&self, _: &Bar) -> bool { true }
28 impl PartialEq<Baz> for Baz {
29 fn eq(&self, _: &Baz) -> bool { true }
36 fn hash<H: Hasher>(&self, _: &mut H) {}
43 fn clone(&self) -> Self { Qux }
46 // looks like unions don't support deriving Clone for now
52 impl Clone for Union {
53 fn clone(&self) -> Self {
66 impl<'a> Clone for Lt<'a> {
67 fn clone(&self) -> Self { unimplemented!() }
70 // Ok, `Clone` cannot be derived because of the big array
76 impl Clone for BigArray {
77 fn clone(&self) -> Self { unimplemented!() }
80 // Ok, function pointers are not always Clone
86 impl Clone for FnPtr {
87 fn clone(&self) -> Self { unimplemented!() }
96 impl<T> Clone for Generic<T> {
97 fn clone(&self) -> Self { unimplemented!() }