1 #![feature(untagged_unions)]
3 #![warn(clippy::expl_impl_clone_on_copy)]
5 use std::hash::{Hash, Hasher};
7 #[derive(PartialEq, Hash)]
10 impl PartialEq<u64> for Foo {
11 fn eq(&self, _: &u64) -> bool {
19 impl PartialEq for Bar {
20 fn eq(&self, _: &Bar) -> bool {
28 impl PartialEq<Baz> for Baz {
29 fn eq(&self, _: &Baz) -> bool {
38 fn hash<H: Hasher>(&self, _: &mut H) {}
45 fn clone(&self) -> Self {
50 // looks like unions don't support deriving Clone for now
56 impl Clone for Union {
57 fn clone(&self) -> Self {
68 impl<'a> Clone for Lt<'a> {
69 fn clone(&self) -> Self {
74 // Ok, `Clone` cannot be derived because of the big array
80 impl Clone for BigArray {
81 fn clone(&self) -> Self {
86 // Ok, function pointers are not always Clone
92 impl Clone for FnPtr {
93 fn clone(&self) -> Self {
104 impl<T> Clone for Generic<T> {
105 fn clone(&self) -> Self {