2 #![warn(clippy::expl_impl_clone_on_copy)]
8 fn clone(&self) -> Self {
13 // looks like unions don't support deriving Clone for now
19 impl Clone for Union {
20 fn clone(&self) -> Self {
31 impl<'a> Clone for Lt<'a> {
32 fn clone(&self) -> Self {
42 impl Clone for BigArray {
43 fn clone(&self) -> Self {
53 impl Clone for FnPtr {
54 fn clone(&self) -> Self {
59 // Ok, Clone trait impl doesn't have constrained generics.
65 impl<T> Clone for Generic<T> {
66 fn clone(&self) -> Self {
72 struct Generic2<T>(T);
73 impl<T: Clone> Clone for Generic2<T> {
74 fn clone(&self) -> Self {
79 // Ok, Clone trait impl doesn't have constrained generics.
81 struct GenericRef<'a, T, U>(T, &'a U);
82 impl<T: Clone, U> Clone for GenericRef<'_, T, U> {
83 fn clone(&self) -> Self {
84 Self(self.0.clone(), self.1)