1 #![feature(untagged_unions)]
3 #![warn(clippy::expl_impl_clone_on_copy)]
9 fn clone(&self) -> Self {
14 // looks like unions don't support deriving Clone for now
20 impl Clone for Union {
21 fn clone(&self) -> Self {
32 impl<'a> Clone for Lt<'a> {
33 fn clone(&self) -> Self {
43 impl Clone for BigArray {
44 fn clone(&self) -> Self {
54 impl Clone for FnPtr {
55 fn clone(&self) -> Self {
60 // Ok, Clone trait impl doesn't have constrained generics.
66 impl<T> Clone for Generic<T> {
67 fn clone(&self) -> Self {
73 struct Generic2<T>(T);
74 impl<T: Clone> Clone for Generic2<T> {
75 fn clone(&self) -> Self {
80 // Ok, Clone trait impl doesn't have constrained generics.
82 struct GenericRef<'a, T, U>(T, &'a U);
83 impl<T: Clone, U> Clone for GenericRef<'_, T, U> {
84 fn clone(&self) -> Self {
85 Self(self.0.clone(), self.1)