@@ -82,16 +82,11 @@ macro_rules! s {
82
82
__item! {
83
83
#[ repr( C ) ]
84
84
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Eq , Hash , PartialEq ) ) ]
85
+ #[ derive( Copy , Clone ) ]
85
86
#[ allow( deprecated) ]
86
87
$( #[ $attr] ) *
87
88
pub struct $i { $( $field) * }
88
89
}
89
- #[ allow( deprecated) ]
90
- impl :: Copy for $i { }
91
- #[ allow( deprecated) ]
92
- impl :: Clone for $i {
93
- fn clone( & self ) -> $i { * self }
94
- }
95
90
) ;
96
91
}
97
92
@@ -106,13 +101,10 @@ macro_rules! s_paren {
106
101
) * ) => ( $(
107
102
__item! {
108
103
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Eq , Hash , PartialEq ) ) ]
104
+ #[ derive( Copy , Clone ) ]
109
105
$( #[ $attr] ) *
110
106
pub struct $i ( $( $field) * ) ;
111
107
}
112
- impl :: Copy for $i { }
113
- impl :: Clone for $i {
114
- fn clone( & self ) -> $i { * self }
115
- }
116
108
) * ) ;
117
109
}
118
110
@@ -130,28 +122,19 @@ macro_rules! s_no_extra_traits {
130
122
( it: $( #[ $attr: meta] ) * pub union $i: ident { $( $field: tt) * } ) => (
131
123
__item! {
132
124
#[ repr( C ) ]
125
+ #[ derive( Copy , Clone ) ]
133
126
$( #[ $attr] ) *
134
127
pub union $i { $( $field) * }
135
128
}
136
-
137
- impl :: Copy for $i { }
138
- impl :: Clone for $i {
139
- fn clone( & self ) -> $i { * self }
140
- }
141
129
) ;
142
130
143
131
( it: $( #[ $attr: meta] ) * pub struct $i: ident { $( $field: tt) * } ) => (
144
132
__item! {
145
133
#[ repr( C ) ]
134
+ #[ derive( Copy , Clone ) ]
146
135
$( #[ $attr] ) *
147
136
pub struct $i { $( $field) * }
148
137
}
149
- #[ allow( deprecated) ]
150
- impl :: Copy for $i { }
151
- #[ allow( deprecated) ]
152
- impl :: Clone for $i {
153
- fn clone( & self ) -> $i { * self }
154
- }
155
138
) ;
156
139
}
157
140
@@ -177,13 +160,10 @@ macro_rules! e {
177
160
) * ) => ( $(
178
161
__item! {
179
162
#[ cfg_attr( feature = "extra_traits" , derive( Debug , Eq , Hash , PartialEq ) ) ]
163
+ #[ derive( Copy , Clone ) ]
180
164
$( #[ $attr] ) *
181
165
pub enum $i { $( $field) * }
182
166
}
183
- impl :: Copy for $i { }
184
- impl :: Clone for $i {
185
- fn clone( & self ) -> $i { * self }
186
- }
187
167
) * ) ;
188
168
}
189
169
0 commit comments