1// This file is @generated by syn-internal-codegen.
2// It is not intended for manual editing.
3
4#![allow(clippy::clone_on_copy, clippy::expl_impl_clone_on_copy)]
5use crate::*;
6#[cfg(any(feature = "derive", feature = "full"))]
7#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
8impl Clone for Abi {
9 fn clone(&self) -> Self {
10 Abi {
11 extern_token: self.extern_token.clone(),
12 name: self.name.clone(),
13 }
14 }
15}
16#[cfg(any(feature = "derive", feature = "full"))]
17#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
18impl Clone for AngleBracketedGenericArguments {
19 fn clone(&self) -> Self {
20 AngleBracketedGenericArguments {
21 colon2_token: self.colon2_token.clone(),
22 lt_token: self.lt_token.clone(),
23 args: self.args.clone(),
24 gt_token: self.gt_token.clone(),
25 }
26 }
27}
28#[cfg(feature = "full")]
29#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
30impl Clone for Arm {
31 fn clone(&self) -> Self {
32 Arm {
33 attrs: self.attrs.clone(),
34 pat: self.pat.clone(),
35 guard: self.guard.clone(),
36 fat_arrow_token: self.fat_arrow_token.clone(),
37 body: self.body.clone(),
38 comma: self.comma.clone(),
39 }
40 }
41}
42#[cfg(any(feature = "derive", feature = "full"))]
43#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
44impl Clone for AssocConst {
45 fn clone(&self) -> Self {
46 AssocConst {
47 ident: self.ident.clone(),
48 generics: self.generics.clone(),
49 eq_token: self.eq_token.clone(),
50 value: self.value.clone(),
51 }
52 }
53}
54#[cfg(any(feature = "derive", feature = "full"))]
55#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
56impl Clone for AssocType {
57 fn clone(&self) -> Self {
58 AssocType {
59 ident: self.ident.clone(),
60 generics: self.generics.clone(),
61 eq_token: self.eq_token.clone(),
62 ty: self.ty.clone(),
63 }
64 }
65}
66#[cfg(any(feature = "derive", feature = "full"))]
67#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
68impl Copy for AttrStyle {}
69#[cfg(any(feature = "derive", feature = "full"))]
70#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
71impl Clone for AttrStyle {
72 fn clone(&self) -> Self {
73 *self
74 }
75}
76#[cfg(any(feature = "derive", feature = "full"))]
77#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
78impl Clone for Attribute {
79 fn clone(&self) -> Self {
80 Attribute {
81 pound_token: self.pound_token.clone(),
82 style: self.style.clone(),
83 bracket_token: self.bracket_token.clone(),
84 meta: self.meta.clone(),
85 }
86 }
87}
88#[cfg(any(feature = "derive", feature = "full"))]
89#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
90impl Clone for BareFnArg {
91 fn clone(&self) -> Self {
92 BareFnArg {
93 attrs: self.attrs.clone(),
94 name: self.name.clone(),
95 ty: self.ty.clone(),
96 }
97 }
98}
99#[cfg(any(feature = "derive", feature = "full"))]
100#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
101impl Clone for BareVariadic {
102 fn clone(&self) -> Self {
103 BareVariadic {
104 attrs: self.attrs.clone(),
105 name: self.name.clone(),
106 dots: self.dots.clone(),
107 comma: self.comma.clone(),
108 }
109 }
110}
111#[cfg(any(feature = "derive", feature = "full"))]
112#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
113impl Copy for BinOp {}
114#[cfg(any(feature = "derive", feature = "full"))]
115#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
116impl Clone for BinOp {
117 fn clone(&self) -> Self {
118 *self
119 }
120}
121#[cfg(feature = "full")]
122#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
123impl Clone for Block {
124 fn clone(&self) -> Self {
125 Block {
126 brace_token: self.brace_token.clone(),
127 stmts: self.stmts.clone(),
128 }
129 }
130}
131#[cfg(any(feature = "derive", feature = "full"))]
132#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
133impl Clone for BoundLifetimes {
134 fn clone(&self) -> Self {
135 BoundLifetimes {
136 for_token: self.for_token.clone(),
137 lt_token: self.lt_token.clone(),
138 lifetimes: self.lifetimes.clone(),
139 gt_token: self.gt_token.clone(),
140 }
141 }
142}
143#[cfg(any(feature = "derive", feature = "full"))]
144#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
145impl Clone for ConstParam {
146 fn clone(&self) -> Self {
147 ConstParam {
148 attrs: self.attrs.clone(),
149 const_token: self.const_token.clone(),
150 ident: self.ident.clone(),
151 colon_token: self.colon_token.clone(),
152 ty: self.ty.clone(),
153 eq_token: self.eq_token.clone(),
154 default: self.default.clone(),
155 }
156 }
157}
158#[cfg(any(feature = "derive", feature = "full"))]
159#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
160impl Clone for Constraint {
161 fn clone(&self) -> Self {
162 Constraint {
163 ident: self.ident.clone(),
164 generics: self.generics.clone(),
165 colon_token: self.colon_token.clone(),
166 bounds: self.bounds.clone(),
167 }
168 }
169}
170#[cfg(feature = "derive")]
171#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
172impl Clone for Data {
173 fn clone(&self) -> Self {
174 match self {
175 Data::Struct(v0) => Data::Struct(v0.clone()),
176 Data::Enum(v0) => Data::Enum(v0.clone()),
177 Data::Union(v0) => Data::Union(v0.clone()),
178 }
179 }
180}
181#[cfg(feature = "derive")]
182#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
183impl Clone for DataEnum {
184 fn clone(&self) -> Self {
185 DataEnum {
186 enum_token: self.enum_token.clone(),
187 brace_token: self.brace_token.clone(),
188 variants: self.variants.clone(),
189 }
190 }
191}
192#[cfg(feature = "derive")]
193#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
194impl Clone for DataStruct {
195 fn clone(&self) -> Self {
196 DataStruct {
197 struct_token: self.struct_token.clone(),
198 fields: self.fields.clone(),
199 semi_token: self.semi_token.clone(),
200 }
201 }
202}
203#[cfg(feature = "derive")]
204#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
205impl Clone for DataUnion {
206 fn clone(&self) -> Self {
207 DataUnion {
208 union_token: self.union_token.clone(),
209 fields: self.fields.clone(),
210 }
211 }
212}
213#[cfg(feature = "derive")]
214#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
215impl Clone for DeriveInput {
216 fn clone(&self) -> Self {
217 DeriveInput {
218 attrs: self.attrs.clone(),
219 vis: self.vis.clone(),
220 ident: self.ident.clone(),
221 generics: self.generics.clone(),
222 data: self.data.clone(),
223 }
224 }
225}
226#[cfg(any(feature = "derive", feature = "full"))]
227#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
228impl Clone for Expr {
229 fn clone(&self) -> Self {
230 match self {
231 #[cfg(feature = "full")]
232 Expr::Array(v0) => Expr::Array(v0.clone()),
233 #[cfg(feature = "full")]
234 Expr::Assign(v0) => Expr::Assign(v0.clone()),
235 #[cfg(feature = "full")]
236 Expr::Async(v0) => Expr::Async(v0.clone()),
237 #[cfg(feature = "full")]
238 Expr::Await(v0) => Expr::Await(v0.clone()),
239 Expr::Binary(v0) => Expr::Binary(v0.clone()),
240 #[cfg(feature = "full")]
241 Expr::Block(v0) => Expr::Block(v0.clone()),
242 #[cfg(feature = "full")]
243 Expr::Break(v0) => Expr::Break(v0.clone()),
244 Expr::Call(v0) => Expr::Call(v0.clone()),
245 Expr::Cast(v0) => Expr::Cast(v0.clone()),
246 #[cfg(feature = "full")]
247 Expr::Closure(v0) => Expr::Closure(v0.clone()),
248 #[cfg(feature = "full")]
249 Expr::Const(v0) => Expr::Const(v0.clone()),
250 #[cfg(feature = "full")]
251 Expr::Continue(v0) => Expr::Continue(v0.clone()),
252 Expr::Field(v0) => Expr::Field(v0.clone()),
253 #[cfg(feature = "full")]
254 Expr::ForLoop(v0) => Expr::ForLoop(v0.clone()),
255 Expr::Group(v0) => Expr::Group(v0.clone()),
256 #[cfg(feature = "full")]
257 Expr::If(v0) => Expr::If(v0.clone()),
258 Expr::Index(v0) => Expr::Index(v0.clone()),
259 #[cfg(feature = "full")]
260 Expr::Infer(v0) => Expr::Infer(v0.clone()),
261 #[cfg(feature = "full")]
262 Expr::Let(v0) => Expr::Let(v0.clone()),
263 Expr::Lit(v0) => Expr::Lit(v0.clone()),
264 #[cfg(feature = "full")]
265 Expr::Loop(v0) => Expr::Loop(v0.clone()),
266 Expr::Macro(v0) => Expr::Macro(v0.clone()),
267 #[cfg(feature = "full")]
268 Expr::Match(v0) => Expr::Match(v0.clone()),
269 #[cfg(feature = "full")]
270 Expr::MethodCall(v0) => Expr::MethodCall(v0.clone()),
271 Expr::Paren(v0) => Expr::Paren(v0.clone()),
272 Expr::Path(v0) => Expr::Path(v0.clone()),
273 #[cfg(feature = "full")]
274 Expr::Range(v0) => Expr::Range(v0.clone()),
275 #[cfg(feature = "full")]
276 Expr::Reference(v0) => Expr::Reference(v0.clone()),
277 #[cfg(feature = "full")]
278 Expr::Repeat(v0) => Expr::Repeat(v0.clone()),
279 #[cfg(feature = "full")]
280 Expr::Return(v0) => Expr::Return(v0.clone()),
281 #[cfg(feature = "full")]
282 Expr::Struct(v0) => Expr::Struct(v0.clone()),
283 #[cfg(feature = "full")]
284 Expr::Try(v0) => Expr::Try(v0.clone()),
285 #[cfg(feature = "full")]
286 Expr::TryBlock(v0) => Expr::TryBlock(v0.clone()),
287 #[cfg(feature = "full")]
288 Expr::Tuple(v0) => Expr::Tuple(v0.clone()),
289 Expr::Unary(v0) => Expr::Unary(v0.clone()),
290 #[cfg(feature = "full")]
291 Expr::Unsafe(v0) => Expr::Unsafe(v0.clone()),
292 Expr::Verbatim(v0) => Expr::Verbatim(v0.clone()),
293 #[cfg(feature = "full")]
294 Expr::While(v0) => Expr::While(v0.clone()),
295 #[cfg(feature = "full")]
296 Expr::Yield(v0) => Expr::Yield(v0.clone()),
297 #[cfg(not(feature = "full"))]
298 _ => unreachable!(),
299 }
300 }
301}
302#[cfg(feature = "full")]
303#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
304impl Clone for ExprArray {
305 fn clone(&self) -> Self {
306 ExprArray {
307 attrs: self.attrs.clone(),
308 bracket_token: self.bracket_token.clone(),
309 elems: self.elems.clone(),
310 }
311 }
312}
313#[cfg(feature = "full")]
314#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
315impl Clone for ExprAssign {
316 fn clone(&self) -> Self {
317 ExprAssign {
318 attrs: self.attrs.clone(),
319 left: self.left.clone(),
320 eq_token: self.eq_token.clone(),
321 right: self.right.clone(),
322 }
323 }
324}
325#[cfg(feature = "full")]
326#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
327impl Clone for ExprAsync {
328 fn clone(&self) -> Self {
329 ExprAsync {
330 attrs: self.attrs.clone(),
331 async_token: self.async_token.clone(),
332 capture: self.capture.clone(),
333 block: self.block.clone(),
334 }
335 }
336}
337#[cfg(feature = "full")]
338#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
339impl Clone for ExprAwait {
340 fn clone(&self) -> Self {
341 ExprAwait {
342 attrs: self.attrs.clone(),
343 base: self.base.clone(),
344 dot_token: self.dot_token.clone(),
345 await_token: self.await_token.clone(),
346 }
347 }
348}
349#[cfg(any(feature = "derive", feature = "full"))]
350#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
351impl Clone for ExprBinary {
352 fn clone(&self) -> Self {
353 ExprBinary {
354 attrs: self.attrs.clone(),
355 left: self.left.clone(),
356 op: self.op.clone(),
357 right: self.right.clone(),
358 }
359 }
360}
361#[cfg(feature = "full")]
362#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
363impl Clone for ExprBlock {
364 fn clone(&self) -> Self {
365 ExprBlock {
366 attrs: self.attrs.clone(),
367 label: self.label.clone(),
368 block: self.block.clone(),
369 }
370 }
371}
372#[cfg(feature = "full")]
373#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
374impl Clone for ExprBreak {
375 fn clone(&self) -> Self {
376 ExprBreak {
377 attrs: self.attrs.clone(),
378 break_token: self.break_token.clone(),
379 label: self.label.clone(),
380 expr: self.expr.clone(),
381 }
382 }
383}
384#[cfg(any(feature = "derive", feature = "full"))]
385#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
386impl Clone for ExprCall {
387 fn clone(&self) -> Self {
388 ExprCall {
389 attrs: self.attrs.clone(),
390 func: self.func.clone(),
391 paren_token: self.paren_token.clone(),
392 args: self.args.clone(),
393 }
394 }
395}
396#[cfg(any(feature = "derive", feature = "full"))]
397#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
398impl Clone for ExprCast {
399 fn clone(&self) -> Self {
400 ExprCast {
401 attrs: self.attrs.clone(),
402 expr: self.expr.clone(),
403 as_token: self.as_token.clone(),
404 ty: self.ty.clone(),
405 }
406 }
407}
408#[cfg(feature = "full")]
409#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
410impl Clone for ExprClosure {
411 fn clone(&self) -> Self {
412 ExprClosure {
413 attrs: self.attrs.clone(),
414 lifetimes: self.lifetimes.clone(),
415 constness: self.constness.clone(),
416 movability: self.movability.clone(),
417 asyncness: self.asyncness.clone(),
418 capture: self.capture.clone(),
419 or1_token: self.or1_token.clone(),
420 inputs: self.inputs.clone(),
421 or2_token: self.or2_token.clone(),
422 output: self.output.clone(),
423 body: self.body.clone(),
424 }
425 }
426}
427#[cfg(feature = "full")]
428#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
429impl Clone for ExprConst {
430 fn clone(&self) -> Self {
431 ExprConst {
432 attrs: self.attrs.clone(),
433 const_token: self.const_token.clone(),
434 block: self.block.clone(),
435 }
436 }
437}
438#[cfg(feature = "full")]
439#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
440impl Clone for ExprContinue {
441 fn clone(&self) -> Self {
442 ExprContinue {
443 attrs: self.attrs.clone(),
444 continue_token: self.continue_token.clone(),
445 label: self.label.clone(),
446 }
447 }
448}
449#[cfg(any(feature = "derive", feature = "full"))]
450#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
451impl Clone for ExprField {
452 fn clone(&self) -> Self {
453 ExprField {
454 attrs: self.attrs.clone(),
455 base: self.base.clone(),
456 dot_token: self.dot_token.clone(),
457 member: self.member.clone(),
458 }
459 }
460}
461#[cfg(feature = "full")]
462#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
463impl Clone for ExprForLoop {
464 fn clone(&self) -> Self {
465 ExprForLoop {
466 attrs: self.attrs.clone(),
467 label: self.label.clone(),
468 for_token: self.for_token.clone(),
469 pat: self.pat.clone(),
470 in_token: self.in_token.clone(),
471 expr: self.expr.clone(),
472 body: self.body.clone(),
473 }
474 }
475}
476#[cfg(any(feature = "derive", feature = "full"))]
477#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
478impl Clone for ExprGroup {
479 fn clone(&self) -> Self {
480 ExprGroup {
481 attrs: self.attrs.clone(),
482 group_token: self.group_token.clone(),
483 expr: self.expr.clone(),
484 }
485 }
486}
487#[cfg(feature = "full")]
488#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
489impl Clone for ExprIf {
490 fn clone(&self) -> Self {
491 ExprIf {
492 attrs: self.attrs.clone(),
493 if_token: self.if_token.clone(),
494 cond: self.cond.clone(),
495 then_branch: self.then_branch.clone(),
496 else_branch: self.else_branch.clone(),
497 }
498 }
499}
500#[cfg(any(feature = "derive", feature = "full"))]
501#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
502impl Clone for ExprIndex {
503 fn clone(&self) -> Self {
504 ExprIndex {
505 attrs: self.attrs.clone(),
506 expr: self.expr.clone(),
507 bracket_token: self.bracket_token.clone(),
508 index: self.index.clone(),
509 }
510 }
511}
512#[cfg(feature = "full")]
513#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
514impl Clone for ExprInfer {
515 fn clone(&self) -> Self {
516 ExprInfer {
517 attrs: self.attrs.clone(),
518 underscore_token: self.underscore_token.clone(),
519 }
520 }
521}
522#[cfg(feature = "full")]
523#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
524impl Clone for ExprLet {
525 fn clone(&self) -> Self {
526 ExprLet {
527 attrs: self.attrs.clone(),
528 let_token: self.let_token.clone(),
529 pat: self.pat.clone(),
530 eq_token: self.eq_token.clone(),
531 expr: self.expr.clone(),
532 }
533 }
534}
535#[cfg(any(feature = "derive", feature = "full"))]
536#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
537impl Clone for ExprLit {
538 fn clone(&self) -> Self {
539 ExprLit {
540 attrs: self.attrs.clone(),
541 lit: self.lit.clone(),
542 }
543 }
544}
545#[cfg(feature = "full")]
546#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
547impl Clone for ExprLoop {
548 fn clone(&self) -> Self {
549 ExprLoop {
550 attrs: self.attrs.clone(),
551 label: self.label.clone(),
552 loop_token: self.loop_token.clone(),
553 body: self.body.clone(),
554 }
555 }
556}
557#[cfg(any(feature = "derive", feature = "full"))]
558#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
559impl Clone for ExprMacro {
560 fn clone(&self) -> Self {
561 ExprMacro {
562 attrs: self.attrs.clone(),
563 mac: self.mac.clone(),
564 }
565 }
566}
567#[cfg(feature = "full")]
568#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
569impl Clone for ExprMatch {
570 fn clone(&self) -> Self {
571 ExprMatch {
572 attrs: self.attrs.clone(),
573 match_token: self.match_token.clone(),
574 expr: self.expr.clone(),
575 brace_token: self.brace_token.clone(),
576 arms: self.arms.clone(),
577 }
578 }
579}
580#[cfg(feature = "full")]
581#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
582impl Clone for ExprMethodCall {
583 fn clone(&self) -> Self {
584 ExprMethodCall {
585 attrs: self.attrs.clone(),
586 receiver: self.receiver.clone(),
587 dot_token: self.dot_token.clone(),
588 method: self.method.clone(),
589 turbofish: self.turbofish.clone(),
590 paren_token: self.paren_token.clone(),
591 args: self.args.clone(),
592 }
593 }
594}
595#[cfg(any(feature = "derive", feature = "full"))]
596#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
597impl Clone for ExprParen {
598 fn clone(&self) -> Self {
599 ExprParen {
600 attrs: self.attrs.clone(),
601 paren_token: self.paren_token.clone(),
602 expr: self.expr.clone(),
603 }
604 }
605}
606#[cfg(any(feature = "derive", feature = "full"))]
607#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
608impl Clone for ExprPath {
609 fn clone(&self) -> Self {
610 ExprPath {
611 attrs: self.attrs.clone(),
612 qself: self.qself.clone(),
613 path: self.path.clone(),
614 }
615 }
616}
617#[cfg(feature = "full")]
618#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
619impl Clone for ExprRange {
620 fn clone(&self) -> Self {
621 ExprRange {
622 attrs: self.attrs.clone(),
623 start: self.start.clone(),
624 limits: self.limits.clone(),
625 end: self.end.clone(),
626 }
627 }
628}
629#[cfg(feature = "full")]
630#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
631impl Clone for ExprReference {
632 fn clone(&self) -> Self {
633 ExprReference {
634 attrs: self.attrs.clone(),
635 and_token: self.and_token.clone(),
636 mutability: self.mutability.clone(),
637 expr: self.expr.clone(),
638 }
639 }
640}
641#[cfg(feature = "full")]
642#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
643impl Clone for ExprRepeat {
644 fn clone(&self) -> Self {
645 ExprRepeat {
646 attrs: self.attrs.clone(),
647 bracket_token: self.bracket_token.clone(),
648 expr: self.expr.clone(),
649 semi_token: self.semi_token.clone(),
650 len: self.len.clone(),
651 }
652 }
653}
654#[cfg(feature = "full")]
655#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
656impl Clone for ExprReturn {
657 fn clone(&self) -> Self {
658 ExprReturn {
659 attrs: self.attrs.clone(),
660 return_token: self.return_token.clone(),
661 expr: self.expr.clone(),
662 }
663 }
664}
665#[cfg(feature = "full")]
666#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
667impl Clone for ExprStruct {
668 fn clone(&self) -> Self {
669 ExprStruct {
670 attrs: self.attrs.clone(),
671 qself: self.qself.clone(),
672 path: self.path.clone(),
673 brace_token: self.brace_token.clone(),
674 fields: self.fields.clone(),
675 dot2_token: self.dot2_token.clone(),
676 rest: self.rest.clone(),
677 }
678 }
679}
680#[cfg(feature = "full")]
681#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
682impl Clone for ExprTry {
683 fn clone(&self) -> Self {
684 ExprTry {
685 attrs: self.attrs.clone(),
686 expr: self.expr.clone(),
687 question_token: self.question_token.clone(),
688 }
689 }
690}
691#[cfg(feature = "full")]
692#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
693impl Clone for ExprTryBlock {
694 fn clone(&self) -> Self {
695 ExprTryBlock {
696 attrs: self.attrs.clone(),
697 try_token: self.try_token.clone(),
698 block: self.block.clone(),
699 }
700 }
701}
702#[cfg(feature = "full")]
703#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
704impl Clone for ExprTuple {
705 fn clone(&self) -> Self {
706 ExprTuple {
707 attrs: self.attrs.clone(),
708 paren_token: self.paren_token.clone(),
709 elems: self.elems.clone(),
710 }
711 }
712}
713#[cfg(any(feature = "derive", feature = "full"))]
714#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
715impl Clone for ExprUnary {
716 fn clone(&self) -> Self {
717 ExprUnary {
718 attrs: self.attrs.clone(),
719 op: self.op.clone(),
720 expr: self.expr.clone(),
721 }
722 }
723}
724#[cfg(feature = "full")]
725#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
726impl Clone for ExprUnsafe {
727 fn clone(&self) -> Self {
728 ExprUnsafe {
729 attrs: self.attrs.clone(),
730 unsafe_token: self.unsafe_token.clone(),
731 block: self.block.clone(),
732 }
733 }
734}
735#[cfg(feature = "full")]
736#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
737impl Clone for ExprWhile {
738 fn clone(&self) -> Self {
739 ExprWhile {
740 attrs: self.attrs.clone(),
741 label: self.label.clone(),
742 while_token: self.while_token.clone(),
743 cond: self.cond.clone(),
744 body: self.body.clone(),
745 }
746 }
747}
748#[cfg(feature = "full")]
749#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
750impl Clone for ExprYield {
751 fn clone(&self) -> Self {
752 ExprYield {
753 attrs: self.attrs.clone(),
754 yield_token: self.yield_token.clone(),
755 expr: self.expr.clone(),
756 }
757 }
758}
759#[cfg(any(feature = "derive", feature = "full"))]
760#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
761impl Clone for Field {
762 fn clone(&self) -> Self {
763 Field {
764 attrs: self.attrs.clone(),
765 vis: self.vis.clone(),
766 mutability: self.mutability.clone(),
767 ident: self.ident.clone(),
768 colon_token: self.colon_token.clone(),
769 ty: self.ty.clone(),
770 }
771 }
772}
773#[cfg(any(feature = "derive", feature = "full"))]
774#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
775impl Clone for FieldMutability {
776 fn clone(&self) -> Self {
777 match self {
778 FieldMutability::None => FieldMutability::None,
779 }
780 }
781}
782#[cfg(feature = "full")]
783#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
784impl Clone for FieldPat {
785 fn clone(&self) -> Self {
786 FieldPat {
787 attrs: self.attrs.clone(),
788 member: self.member.clone(),
789 colon_token: self.colon_token.clone(),
790 pat: self.pat.clone(),
791 }
792 }
793}
794#[cfg(feature = "full")]
795#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
796impl Clone for FieldValue {
797 fn clone(&self) -> Self {
798 FieldValue {
799 attrs: self.attrs.clone(),
800 member: self.member.clone(),
801 colon_token: self.colon_token.clone(),
802 expr: self.expr.clone(),
803 }
804 }
805}
806#[cfg(any(feature = "derive", feature = "full"))]
807#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
808impl Clone for Fields {
809 fn clone(&self) -> Self {
810 match self {
811 Fields::Named(v0) => Fields::Named(v0.clone()),
812 Fields::Unnamed(v0) => Fields::Unnamed(v0.clone()),
813 Fields::Unit => Fields::Unit,
814 }
815 }
816}
817#[cfg(any(feature = "derive", feature = "full"))]
818#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
819impl Clone for FieldsNamed {
820 fn clone(&self) -> Self {
821 FieldsNamed {
822 brace_token: self.brace_token.clone(),
823 named: self.named.clone(),
824 }
825 }
826}
827#[cfg(any(feature = "derive", feature = "full"))]
828#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
829impl Clone for FieldsUnnamed {
830 fn clone(&self) -> Self {
831 FieldsUnnamed {
832 paren_token: self.paren_token.clone(),
833 unnamed: self.unnamed.clone(),
834 }
835 }
836}
837#[cfg(feature = "full")]
838#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
839impl Clone for File {
840 fn clone(&self) -> Self {
841 File {
842 shebang: self.shebang.clone(),
843 attrs: self.attrs.clone(),
844 items: self.items.clone(),
845 }
846 }
847}
848#[cfg(feature = "full")]
849#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
850impl Clone for FnArg {
851 fn clone(&self) -> Self {
852 match self {
853 FnArg::Receiver(v0) => FnArg::Receiver(v0.clone()),
854 FnArg::Typed(v0) => FnArg::Typed(v0.clone()),
855 }
856 }
857}
858#[cfg(feature = "full")]
859#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
860impl Clone for ForeignItem {
861 fn clone(&self) -> Self {
862 match self {
863 ForeignItem::Fn(v0) => ForeignItem::Fn(v0.clone()),
864 ForeignItem::Static(v0) => ForeignItem::Static(v0.clone()),
865 ForeignItem::Type(v0) => ForeignItem::Type(v0.clone()),
866 ForeignItem::Macro(v0) => ForeignItem::Macro(v0.clone()),
867 ForeignItem::Verbatim(v0) => ForeignItem::Verbatim(v0.clone()),
868 }
869 }
870}
871#[cfg(feature = "full")]
872#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
873impl Clone for ForeignItemFn {
874 fn clone(&self) -> Self {
875 ForeignItemFn {
876 attrs: self.attrs.clone(),
877 vis: self.vis.clone(),
878 sig: self.sig.clone(),
879 semi_token: self.semi_token.clone(),
880 }
881 }
882}
883#[cfg(feature = "full")]
884#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
885impl Clone for ForeignItemMacro {
886 fn clone(&self) -> Self {
887 ForeignItemMacro {
888 attrs: self.attrs.clone(),
889 mac: self.mac.clone(),
890 semi_token: self.semi_token.clone(),
891 }
892 }
893}
894#[cfg(feature = "full")]
895#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
896impl Clone for ForeignItemStatic {
897 fn clone(&self) -> Self {
898 ForeignItemStatic {
899 attrs: self.attrs.clone(),
900 vis: self.vis.clone(),
901 static_token: self.static_token.clone(),
902 mutability: self.mutability.clone(),
903 ident: self.ident.clone(),
904 colon_token: self.colon_token.clone(),
905 ty: self.ty.clone(),
906 semi_token: self.semi_token.clone(),
907 }
908 }
909}
910#[cfg(feature = "full")]
911#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
912impl Clone for ForeignItemType {
913 fn clone(&self) -> Self {
914 ForeignItemType {
915 attrs: self.attrs.clone(),
916 vis: self.vis.clone(),
917 type_token: self.type_token.clone(),
918 ident: self.ident.clone(),
919 generics: self.generics.clone(),
920 semi_token: self.semi_token.clone(),
921 }
922 }
923}
924#[cfg(any(feature = "derive", feature = "full"))]
925#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
926impl Clone for GenericArgument {
927 fn clone(&self) -> Self {
928 match self {
929 GenericArgument::Lifetime(v0) => GenericArgument::Lifetime(v0.clone()),
930 GenericArgument::Type(v0) => GenericArgument::Type(v0.clone()),
931 GenericArgument::Const(v0) => GenericArgument::Const(v0.clone()),
932 GenericArgument::AssocType(v0) => GenericArgument::AssocType(v0.clone()),
933 GenericArgument::AssocConst(v0) => GenericArgument::AssocConst(v0.clone()),
934 GenericArgument::Constraint(v0) => GenericArgument::Constraint(v0.clone()),
935 }
936 }
937}
938#[cfg(any(feature = "derive", feature = "full"))]
939#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
940impl Clone for GenericParam {
941 fn clone(&self) -> Self {
942 match self {
943 GenericParam::Lifetime(v0) => GenericParam::Lifetime(v0.clone()),
944 GenericParam::Type(v0) => GenericParam::Type(v0.clone()),
945 GenericParam::Const(v0) => GenericParam::Const(v0.clone()),
946 }
947 }
948}
949#[cfg(any(feature = "derive", feature = "full"))]
950#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
951impl Clone for Generics {
952 fn clone(&self) -> Self {
953 Generics {
954 lt_token: self.lt_token.clone(),
955 params: self.params.clone(),
956 gt_token: self.gt_token.clone(),
957 where_clause: self.where_clause.clone(),
958 }
959 }
960}
961#[cfg(feature = "full")]
962#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
963impl Clone for ImplItem {
964 fn clone(&self) -> Self {
965 match self {
966 ImplItem::Const(v0) => ImplItem::Const(v0.clone()),
967 ImplItem::Fn(v0) => ImplItem::Fn(v0.clone()),
968 ImplItem::Type(v0) => ImplItem::Type(v0.clone()),
969 ImplItem::Macro(v0) => ImplItem::Macro(v0.clone()),
970 ImplItem::Verbatim(v0) => ImplItem::Verbatim(v0.clone()),
971 }
972 }
973}
974#[cfg(feature = "full")]
975#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
976impl Clone for ImplItemConst {
977 fn clone(&self) -> Self {
978 ImplItemConst {
979 attrs: self.attrs.clone(),
980 vis: self.vis.clone(),
981 defaultness: self.defaultness.clone(),
982 const_token: self.const_token.clone(),
983 ident: self.ident.clone(),
984 generics: self.generics.clone(),
985 colon_token: self.colon_token.clone(),
986 ty: self.ty.clone(),
987 eq_token: self.eq_token.clone(),
988 expr: self.expr.clone(),
989 semi_token: self.semi_token.clone(),
990 }
991 }
992}
993#[cfg(feature = "full")]
994#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
995impl Clone for ImplItemFn {
996 fn clone(&self) -> Self {
997 ImplItemFn {
998 attrs: self.attrs.clone(),
999 vis: self.vis.clone(),
1000 defaultness: self.defaultness.clone(),
1001 sig: self.sig.clone(),
1002 block: self.block.clone(),
1003 }
1004 }
1005}
1006#[cfg(feature = "full")]
1007#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1008impl Clone for ImplItemMacro {
1009 fn clone(&self) -> Self {
1010 ImplItemMacro {
1011 attrs: self.attrs.clone(),
1012 mac: self.mac.clone(),
1013 semi_token: self.semi_token.clone(),
1014 }
1015 }
1016}
1017#[cfg(feature = "full")]
1018#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1019impl Clone for ImplItemType {
1020 fn clone(&self) -> Self {
1021 ImplItemType {
1022 attrs: self.attrs.clone(),
1023 vis: self.vis.clone(),
1024 defaultness: self.defaultness.clone(),
1025 type_token: self.type_token.clone(),
1026 ident: self.ident.clone(),
1027 generics: self.generics.clone(),
1028 eq_token: self.eq_token.clone(),
1029 ty: self.ty.clone(),
1030 semi_token: self.semi_token.clone(),
1031 }
1032 }
1033}
1034#[cfg(feature = "full")]
1035#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1036impl Clone for ImplRestriction {
1037 fn clone(&self) -> Self {
1038 match *self {}
1039 }
1040}
1041#[cfg(any(feature = "derive", feature = "full"))]
1042#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1043impl Clone for Index {
1044 fn clone(&self) -> Self {
1045 Index {
1046 index: self.index.clone(),
1047 span: self.span.clone(),
1048 }
1049 }
1050}
1051#[cfg(feature = "full")]
1052#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1053impl Clone for Item {
1054 fn clone(&self) -> Self {
1055 match self {
1056 Item::Const(v0) => Item::Const(v0.clone()),
1057 Item::Enum(v0) => Item::Enum(v0.clone()),
1058 Item::ExternCrate(v0) => Item::ExternCrate(v0.clone()),
1059 Item::Fn(v0) => Item::Fn(v0.clone()),
1060 Item::ForeignMod(v0) => Item::ForeignMod(v0.clone()),
1061 Item::Impl(v0) => Item::Impl(v0.clone()),
1062 Item::Macro(v0) => Item::Macro(v0.clone()),
1063 Item::Mod(v0) => Item::Mod(v0.clone()),
1064 Item::Static(v0) => Item::Static(v0.clone()),
1065 Item::Struct(v0) => Item::Struct(v0.clone()),
1066 Item::Trait(v0) => Item::Trait(v0.clone()),
1067 Item::TraitAlias(v0) => Item::TraitAlias(v0.clone()),
1068 Item::Type(v0) => Item::Type(v0.clone()),
1069 Item::Union(v0) => Item::Union(v0.clone()),
1070 Item::Use(v0) => Item::Use(v0.clone()),
1071 Item::Verbatim(v0) => Item::Verbatim(v0.clone()),
1072 }
1073 }
1074}
1075#[cfg(feature = "full")]
1076#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1077impl Clone for ItemConst {
1078 fn clone(&self) -> Self {
1079 ItemConst {
1080 attrs: self.attrs.clone(),
1081 vis: self.vis.clone(),
1082 const_token: self.const_token.clone(),
1083 ident: self.ident.clone(),
1084 generics: self.generics.clone(),
1085 colon_token: self.colon_token.clone(),
1086 ty: self.ty.clone(),
1087 eq_token: self.eq_token.clone(),
1088 expr: self.expr.clone(),
1089 semi_token: self.semi_token.clone(),
1090 }
1091 }
1092}
1093#[cfg(feature = "full")]
1094#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1095impl Clone for ItemEnum {
1096 fn clone(&self) -> Self {
1097 ItemEnum {
1098 attrs: self.attrs.clone(),
1099 vis: self.vis.clone(),
1100 enum_token: self.enum_token.clone(),
1101 ident: self.ident.clone(),
1102 generics: self.generics.clone(),
1103 brace_token: self.brace_token.clone(),
1104 variants: self.variants.clone(),
1105 }
1106 }
1107}
1108#[cfg(feature = "full")]
1109#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1110impl Clone for ItemExternCrate {
1111 fn clone(&self) -> Self {
1112 ItemExternCrate {
1113 attrs: self.attrs.clone(),
1114 vis: self.vis.clone(),
1115 extern_token: self.extern_token.clone(),
1116 crate_token: self.crate_token.clone(),
1117 ident: self.ident.clone(),
1118 rename: self.rename.clone(),
1119 semi_token: self.semi_token.clone(),
1120 }
1121 }
1122}
1123#[cfg(feature = "full")]
1124#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1125impl Clone for ItemFn {
1126 fn clone(&self) -> Self {
1127 ItemFn {
1128 attrs: self.attrs.clone(),
1129 vis: self.vis.clone(),
1130 sig: self.sig.clone(),
1131 block: self.block.clone(),
1132 }
1133 }
1134}
1135#[cfg(feature = "full")]
1136#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1137impl Clone for ItemForeignMod {
1138 fn clone(&self) -> Self {
1139 ItemForeignMod {
1140 attrs: self.attrs.clone(),
1141 unsafety: self.unsafety.clone(),
1142 abi: self.abi.clone(),
1143 brace_token: self.brace_token.clone(),
1144 items: self.items.clone(),
1145 }
1146 }
1147}
1148#[cfg(feature = "full")]
1149#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1150impl Clone for ItemImpl {
1151 fn clone(&self) -> Self {
1152 ItemImpl {
1153 attrs: self.attrs.clone(),
1154 defaultness: self.defaultness.clone(),
1155 unsafety: self.unsafety.clone(),
1156 impl_token: self.impl_token.clone(),
1157 generics: self.generics.clone(),
1158 trait_: self.trait_.clone(),
1159 self_ty: self.self_ty.clone(),
1160 brace_token: self.brace_token.clone(),
1161 items: self.items.clone(),
1162 }
1163 }
1164}
1165#[cfg(feature = "full")]
1166#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1167impl Clone for ItemMacro {
1168 fn clone(&self) -> Self {
1169 ItemMacro {
1170 attrs: self.attrs.clone(),
1171 ident: self.ident.clone(),
1172 mac: self.mac.clone(),
1173 semi_token: self.semi_token.clone(),
1174 }
1175 }
1176}
1177#[cfg(feature = "full")]
1178#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1179impl Clone for ItemMod {
1180 fn clone(&self) -> Self {
1181 ItemMod {
1182 attrs: self.attrs.clone(),
1183 vis: self.vis.clone(),
1184 unsafety: self.unsafety.clone(),
1185 mod_token: self.mod_token.clone(),
1186 ident: self.ident.clone(),
1187 content: self.content.clone(),
1188 semi: self.semi.clone(),
1189 }
1190 }
1191}
1192#[cfg(feature = "full")]
1193#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1194impl Clone for ItemStatic {
1195 fn clone(&self) -> Self {
1196 ItemStatic {
1197 attrs: self.attrs.clone(),
1198 vis: self.vis.clone(),
1199 static_token: self.static_token.clone(),
1200 mutability: self.mutability.clone(),
1201 ident: self.ident.clone(),
1202 colon_token: self.colon_token.clone(),
1203 ty: self.ty.clone(),
1204 eq_token: self.eq_token.clone(),
1205 expr: self.expr.clone(),
1206 semi_token: self.semi_token.clone(),
1207 }
1208 }
1209}
1210#[cfg(feature = "full")]
1211#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1212impl Clone for ItemStruct {
1213 fn clone(&self) -> Self {
1214 ItemStruct {
1215 attrs: self.attrs.clone(),
1216 vis: self.vis.clone(),
1217 struct_token: self.struct_token.clone(),
1218 ident: self.ident.clone(),
1219 generics: self.generics.clone(),
1220 fields: self.fields.clone(),
1221 semi_token: self.semi_token.clone(),
1222 }
1223 }
1224}
1225#[cfg(feature = "full")]
1226#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1227impl Clone for ItemTrait {
1228 fn clone(&self) -> Self {
1229 ItemTrait {
1230 attrs: self.attrs.clone(),
1231 vis: self.vis.clone(),
1232 unsafety: self.unsafety.clone(),
1233 auto_token: self.auto_token.clone(),
1234 restriction: self.restriction.clone(),
1235 trait_token: self.trait_token.clone(),
1236 ident: self.ident.clone(),
1237 generics: self.generics.clone(),
1238 colon_token: self.colon_token.clone(),
1239 supertraits: self.supertraits.clone(),
1240 brace_token: self.brace_token.clone(),
1241 items: self.items.clone(),
1242 }
1243 }
1244}
1245#[cfg(feature = "full")]
1246#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1247impl Clone for ItemTraitAlias {
1248 fn clone(&self) -> Self {
1249 ItemTraitAlias {
1250 attrs: self.attrs.clone(),
1251 vis: self.vis.clone(),
1252 trait_token: self.trait_token.clone(),
1253 ident: self.ident.clone(),
1254 generics: self.generics.clone(),
1255 eq_token: self.eq_token.clone(),
1256 bounds: self.bounds.clone(),
1257 semi_token: self.semi_token.clone(),
1258 }
1259 }
1260}
1261#[cfg(feature = "full")]
1262#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1263impl Clone for ItemType {
1264 fn clone(&self) -> Self {
1265 ItemType {
1266 attrs: self.attrs.clone(),
1267 vis: self.vis.clone(),
1268 type_token: self.type_token.clone(),
1269 ident: self.ident.clone(),
1270 generics: self.generics.clone(),
1271 eq_token: self.eq_token.clone(),
1272 ty: self.ty.clone(),
1273 semi_token: self.semi_token.clone(),
1274 }
1275 }
1276}
1277#[cfg(feature = "full")]
1278#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1279impl Clone for ItemUnion {
1280 fn clone(&self) -> Self {
1281 ItemUnion {
1282 attrs: self.attrs.clone(),
1283 vis: self.vis.clone(),
1284 union_token: self.union_token.clone(),
1285 ident: self.ident.clone(),
1286 generics: self.generics.clone(),
1287 fields: self.fields.clone(),
1288 }
1289 }
1290}
1291#[cfg(feature = "full")]
1292#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1293impl Clone for ItemUse {
1294 fn clone(&self) -> Self {
1295 ItemUse {
1296 attrs: self.attrs.clone(),
1297 vis: self.vis.clone(),
1298 use_token: self.use_token.clone(),
1299 leading_colon: self.leading_colon.clone(),
1300 tree: self.tree.clone(),
1301 semi_token: self.semi_token.clone(),
1302 }
1303 }
1304}
1305#[cfg(feature = "full")]
1306#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1307impl Clone for Label {
1308 fn clone(&self) -> Self {
1309 Label {
1310 name: self.name.clone(),
1311 colon_token: self.colon_token.clone(),
1312 }
1313 }
1314}
1315#[cfg(any(feature = "derive", feature = "full"))]
1316#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1317impl Clone for LifetimeParam {
1318 fn clone(&self) -> Self {
1319 LifetimeParam {
1320 attrs: self.attrs.clone(),
1321 lifetime: self.lifetime.clone(),
1322 colon_token: self.colon_token.clone(),
1323 bounds: self.bounds.clone(),
1324 }
1325 }
1326}
1327#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1328impl Clone for Lit {
1329 fn clone(&self) -> Self {
1330 match self {
1331 Lit::Str(v0) => Lit::Str(v0.clone()),
1332 Lit::ByteStr(v0) => Lit::ByteStr(v0.clone()),
1333 Lit::Byte(v0) => Lit::Byte(v0.clone()),
1334 Lit::Char(v0) => Lit::Char(v0.clone()),
1335 Lit::Int(v0) => Lit::Int(v0.clone()),
1336 Lit::Float(v0) => Lit::Float(v0.clone()),
1337 Lit::Bool(v0) => Lit::Bool(v0.clone()),
1338 Lit::Verbatim(v0) => Lit::Verbatim(v0.clone()),
1339 }
1340 }
1341}
1342#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1343impl Clone for LitBool {
1344 fn clone(&self) -> Self {
1345 LitBool {
1346 value: self.value.clone(),
1347 span: self.span.clone(),
1348 }
1349 }
1350}
1351#[cfg(feature = "full")]
1352#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1353impl Clone for Local {
1354 fn clone(&self) -> Self {
1355 Local {
1356 attrs: self.attrs.clone(),
1357 let_token: self.let_token.clone(),
1358 pat: self.pat.clone(),
1359 init: self.init.clone(),
1360 semi_token: self.semi_token.clone(),
1361 }
1362 }
1363}
1364#[cfg(feature = "full")]
1365#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1366impl Clone for LocalInit {
1367 fn clone(&self) -> Self {
1368 LocalInit {
1369 eq_token: self.eq_token.clone(),
1370 expr: self.expr.clone(),
1371 diverge: self.diverge.clone(),
1372 }
1373 }
1374}
1375#[cfg(any(feature = "derive", feature = "full"))]
1376#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1377impl Clone for Macro {
1378 fn clone(&self) -> Self {
1379 Macro {
1380 path: self.path.clone(),
1381 bang_token: self.bang_token.clone(),
1382 delimiter: self.delimiter.clone(),
1383 tokens: self.tokens.clone(),
1384 }
1385 }
1386}
1387#[cfg(any(feature = "derive", feature = "full"))]
1388#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1389impl Clone for MacroDelimiter {
1390 fn clone(&self) -> Self {
1391 match self {
1392 MacroDelimiter::Paren(v0) => MacroDelimiter::Paren(v0.clone()),
1393 MacroDelimiter::Brace(v0) => MacroDelimiter::Brace(v0.clone()),
1394 MacroDelimiter::Bracket(v0) => MacroDelimiter::Bracket(v0.clone()),
1395 }
1396 }
1397}
1398#[cfg(any(feature = "derive", feature = "full"))]
1399#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1400impl Clone for Member {
1401 fn clone(&self) -> Self {
1402 match self {
1403 Member::Named(v0) => Member::Named(v0.clone()),
1404 Member::Unnamed(v0) => Member::Unnamed(v0.clone()),
1405 }
1406 }
1407}
1408#[cfg(any(feature = "derive", feature = "full"))]
1409#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1410impl Clone for Meta {
1411 fn clone(&self) -> Self {
1412 match self {
1413 Meta::Path(v0) => Meta::Path(v0.clone()),
1414 Meta::List(v0) => Meta::List(v0.clone()),
1415 Meta::NameValue(v0) => Meta::NameValue(v0.clone()),
1416 }
1417 }
1418}
1419#[cfg(any(feature = "derive", feature = "full"))]
1420#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1421impl Clone for MetaList {
1422 fn clone(&self) -> Self {
1423 MetaList {
1424 path: self.path.clone(),
1425 delimiter: self.delimiter.clone(),
1426 tokens: self.tokens.clone(),
1427 }
1428 }
1429}
1430#[cfg(any(feature = "derive", feature = "full"))]
1431#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1432impl Clone for MetaNameValue {
1433 fn clone(&self) -> Self {
1434 MetaNameValue {
1435 path: self.path.clone(),
1436 eq_token: self.eq_token.clone(),
1437 value: self.value.clone(),
1438 }
1439 }
1440}
1441#[cfg(any(feature = "derive", feature = "full"))]
1442#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1443impl Clone for ParenthesizedGenericArguments {
1444 fn clone(&self) -> Self {
1445 ParenthesizedGenericArguments {
1446 paren_token: self.paren_token.clone(),
1447 inputs: self.inputs.clone(),
1448 output: self.output.clone(),
1449 }
1450 }
1451}
1452#[cfg(feature = "full")]
1453#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1454impl Clone for Pat {
1455 fn clone(&self) -> Self {
1456 match self {
1457 Pat::Const(v0) => Pat::Const(v0.clone()),
1458 Pat::Ident(v0) => Pat::Ident(v0.clone()),
1459 Pat::Lit(v0) => Pat::Lit(v0.clone()),
1460 Pat::Macro(v0) => Pat::Macro(v0.clone()),
1461 Pat::Or(v0) => Pat::Or(v0.clone()),
1462 Pat::Paren(v0) => Pat::Paren(v0.clone()),
1463 Pat::Path(v0) => Pat::Path(v0.clone()),
1464 Pat::Range(v0) => Pat::Range(v0.clone()),
1465 Pat::Reference(v0) => Pat::Reference(v0.clone()),
1466 Pat::Rest(v0) => Pat::Rest(v0.clone()),
1467 Pat::Slice(v0) => Pat::Slice(v0.clone()),
1468 Pat::Struct(v0) => Pat::Struct(v0.clone()),
1469 Pat::Tuple(v0) => Pat::Tuple(v0.clone()),
1470 Pat::TupleStruct(v0) => Pat::TupleStruct(v0.clone()),
1471 Pat::Type(v0) => Pat::Type(v0.clone()),
1472 Pat::Verbatim(v0) => Pat::Verbatim(v0.clone()),
1473 Pat::Wild(v0) => Pat::Wild(v0.clone()),
1474 }
1475 }
1476}
1477#[cfg(feature = "full")]
1478#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1479impl Clone for PatIdent {
1480 fn clone(&self) -> Self {
1481 PatIdent {
1482 attrs: self.attrs.clone(),
1483 by_ref: self.by_ref.clone(),
1484 mutability: self.mutability.clone(),
1485 ident: self.ident.clone(),
1486 subpat: self.subpat.clone(),
1487 }
1488 }
1489}
1490#[cfg(feature = "full")]
1491#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1492impl Clone for PatOr {
1493 fn clone(&self) -> Self {
1494 PatOr {
1495 attrs: self.attrs.clone(),
1496 leading_vert: self.leading_vert.clone(),
1497 cases: self.cases.clone(),
1498 }
1499 }
1500}
1501#[cfg(feature = "full")]
1502#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1503impl Clone for PatParen {
1504 fn clone(&self) -> Self {
1505 PatParen {
1506 attrs: self.attrs.clone(),
1507 paren_token: self.paren_token.clone(),
1508 pat: self.pat.clone(),
1509 }
1510 }
1511}
1512#[cfg(feature = "full")]
1513#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1514impl Clone for PatReference {
1515 fn clone(&self) -> Self {
1516 PatReference {
1517 attrs: self.attrs.clone(),
1518 and_token: self.and_token.clone(),
1519 mutability: self.mutability.clone(),
1520 pat: self.pat.clone(),
1521 }
1522 }
1523}
1524#[cfg(feature = "full")]
1525#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1526impl Clone for PatRest {
1527 fn clone(&self) -> Self {
1528 PatRest {
1529 attrs: self.attrs.clone(),
1530 dot2_token: self.dot2_token.clone(),
1531 }
1532 }
1533}
1534#[cfg(feature = "full")]
1535#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1536impl Clone for PatSlice {
1537 fn clone(&self) -> Self {
1538 PatSlice {
1539 attrs: self.attrs.clone(),
1540 bracket_token: self.bracket_token.clone(),
1541 elems: self.elems.clone(),
1542 }
1543 }
1544}
1545#[cfg(feature = "full")]
1546#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1547impl Clone for PatStruct {
1548 fn clone(&self) -> Self {
1549 PatStruct {
1550 attrs: self.attrs.clone(),
1551 qself: self.qself.clone(),
1552 path: self.path.clone(),
1553 brace_token: self.brace_token.clone(),
1554 fields: self.fields.clone(),
1555 rest: self.rest.clone(),
1556 }
1557 }
1558}
1559#[cfg(feature = "full")]
1560#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1561impl Clone for PatTuple {
1562 fn clone(&self) -> Self {
1563 PatTuple {
1564 attrs: self.attrs.clone(),
1565 paren_token: self.paren_token.clone(),
1566 elems: self.elems.clone(),
1567 }
1568 }
1569}
1570#[cfg(feature = "full")]
1571#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1572impl Clone for PatTupleStruct {
1573 fn clone(&self) -> Self {
1574 PatTupleStruct {
1575 attrs: self.attrs.clone(),
1576 qself: self.qself.clone(),
1577 path: self.path.clone(),
1578 paren_token: self.paren_token.clone(),
1579 elems: self.elems.clone(),
1580 }
1581 }
1582}
1583#[cfg(feature = "full")]
1584#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1585impl Clone for PatType {
1586 fn clone(&self) -> Self {
1587 PatType {
1588 attrs: self.attrs.clone(),
1589 pat: self.pat.clone(),
1590 colon_token: self.colon_token.clone(),
1591 ty: self.ty.clone(),
1592 }
1593 }
1594}
1595#[cfg(feature = "full")]
1596#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1597impl Clone for PatWild {
1598 fn clone(&self) -> Self {
1599 PatWild {
1600 attrs: self.attrs.clone(),
1601 underscore_token: self.underscore_token.clone(),
1602 }
1603 }
1604}
1605#[cfg(any(feature = "derive", feature = "full"))]
1606#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1607impl Clone for Path {
1608 fn clone(&self) -> Self {
1609 Path {
1610 leading_colon: self.leading_colon.clone(),
1611 segments: self.segments.clone(),
1612 }
1613 }
1614}
1615#[cfg(any(feature = "derive", feature = "full"))]
1616#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1617impl Clone for PathArguments {
1618 fn clone(&self) -> Self {
1619 match self {
1620 PathArguments::None => PathArguments::None,
1621 PathArguments::AngleBracketed(v0) => {
1622 PathArguments::AngleBracketed(v0.clone())
1623 }
1624 PathArguments::Parenthesized(v0) => PathArguments::Parenthesized(v0.clone()),
1625 }
1626 }
1627}
1628#[cfg(any(feature = "derive", feature = "full"))]
1629#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1630impl Clone for PathSegment {
1631 fn clone(&self) -> Self {
1632 PathSegment {
1633 ident: self.ident.clone(),
1634 arguments: self.arguments.clone(),
1635 }
1636 }
1637}
1638#[cfg(any(feature = "derive", feature = "full"))]
1639#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1640impl Clone for PredicateLifetime {
1641 fn clone(&self) -> Self {
1642 PredicateLifetime {
1643 lifetime: self.lifetime.clone(),
1644 colon_token: self.colon_token.clone(),
1645 bounds: self.bounds.clone(),
1646 }
1647 }
1648}
1649#[cfg(any(feature = "derive", feature = "full"))]
1650#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1651impl Clone for PredicateType {
1652 fn clone(&self) -> Self {
1653 PredicateType {
1654 lifetimes: self.lifetimes.clone(),
1655 bounded_ty: self.bounded_ty.clone(),
1656 colon_token: self.colon_token.clone(),
1657 bounds: self.bounds.clone(),
1658 }
1659 }
1660}
1661#[cfg(any(feature = "derive", feature = "full"))]
1662#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1663impl Clone for QSelf {
1664 fn clone(&self) -> Self {
1665 QSelf {
1666 lt_token: self.lt_token.clone(),
1667 ty: self.ty.clone(),
1668 position: self.position.clone(),
1669 as_token: self.as_token.clone(),
1670 gt_token: self.gt_token.clone(),
1671 }
1672 }
1673}
1674#[cfg(feature = "full")]
1675#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1676impl Copy for RangeLimits {}
1677#[cfg(feature = "full")]
1678#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1679impl Clone for RangeLimits {
1680 fn clone(&self) -> Self {
1681 *self
1682 }
1683}
1684#[cfg(feature = "full")]
1685#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1686impl Clone for Receiver {
1687 fn clone(&self) -> Self {
1688 Receiver {
1689 attrs: self.attrs.clone(),
1690 reference: self.reference.clone(),
1691 mutability: self.mutability.clone(),
1692 self_token: self.self_token.clone(),
1693 colon_token: self.colon_token.clone(),
1694 ty: self.ty.clone(),
1695 }
1696 }
1697}
1698#[cfg(any(feature = "derive", feature = "full"))]
1699#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1700impl Clone for ReturnType {
1701 fn clone(&self) -> Self {
1702 match self {
1703 ReturnType::Default => ReturnType::Default,
1704 ReturnType::Type(v0, v1) => ReturnType::Type(v0.clone(), v1.clone()),
1705 }
1706 }
1707}
1708#[cfg(feature = "full")]
1709#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1710impl Clone for Signature {
1711 fn clone(&self) -> Self {
1712 Signature {
1713 constness: self.constness.clone(),
1714 asyncness: self.asyncness.clone(),
1715 unsafety: self.unsafety.clone(),
1716 abi: self.abi.clone(),
1717 fn_token: self.fn_token.clone(),
1718 ident: self.ident.clone(),
1719 generics: self.generics.clone(),
1720 paren_token: self.paren_token.clone(),
1721 inputs: self.inputs.clone(),
1722 variadic: self.variadic.clone(),
1723 output: self.output.clone(),
1724 }
1725 }
1726}
1727#[cfg(feature = "full")]
1728#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1729impl Clone for StaticMutability {
1730 fn clone(&self) -> Self {
1731 match self {
1732 StaticMutability::Mut(v0) => StaticMutability::Mut(v0.clone()),
1733 StaticMutability::None => StaticMutability::None,
1734 }
1735 }
1736}
1737#[cfg(feature = "full")]
1738#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1739impl Clone for Stmt {
1740 fn clone(&self) -> Self {
1741 match self {
1742 Stmt::Local(v0) => Stmt::Local(v0.clone()),
1743 Stmt::Item(v0) => Stmt::Item(v0.clone()),
1744 Stmt::Expr(v0, v1) => Stmt::Expr(v0.clone(), v1.clone()),
1745 Stmt::Macro(v0) => Stmt::Macro(v0.clone()),
1746 }
1747 }
1748}
1749#[cfg(feature = "full")]
1750#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1751impl Clone for StmtMacro {
1752 fn clone(&self) -> Self {
1753 StmtMacro {
1754 attrs: self.attrs.clone(),
1755 mac: self.mac.clone(),
1756 semi_token: self.semi_token.clone(),
1757 }
1758 }
1759}
1760#[cfg(any(feature = "derive", feature = "full"))]
1761#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1762impl Clone for TraitBound {
1763 fn clone(&self) -> Self {
1764 TraitBound {
1765 paren_token: self.paren_token.clone(),
1766 modifier: self.modifier.clone(),
1767 lifetimes: self.lifetimes.clone(),
1768 path: self.path.clone(),
1769 }
1770 }
1771}
1772#[cfg(any(feature = "derive", feature = "full"))]
1773#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1774impl Copy for TraitBoundModifier {}
1775#[cfg(any(feature = "derive", feature = "full"))]
1776#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1777impl Clone for TraitBoundModifier {
1778 fn clone(&self) -> Self {
1779 *self
1780 }
1781}
1782#[cfg(feature = "full")]
1783#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1784impl Clone for TraitItem {
1785 fn clone(&self) -> Self {
1786 match self {
1787 TraitItem::Const(v0) => TraitItem::Const(v0.clone()),
1788 TraitItem::Fn(v0) => TraitItem::Fn(v0.clone()),
1789 TraitItem::Type(v0) => TraitItem::Type(v0.clone()),
1790 TraitItem::Macro(v0) => TraitItem::Macro(v0.clone()),
1791 TraitItem::Verbatim(v0) => TraitItem::Verbatim(v0.clone()),
1792 }
1793 }
1794}
1795#[cfg(feature = "full")]
1796#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1797impl Clone for TraitItemConst {
1798 fn clone(&self) -> Self {
1799 TraitItemConst {
1800 attrs: self.attrs.clone(),
1801 const_token: self.const_token.clone(),
1802 ident: self.ident.clone(),
1803 generics: self.generics.clone(),
1804 colon_token: self.colon_token.clone(),
1805 ty: self.ty.clone(),
1806 default: self.default.clone(),
1807 semi_token: self.semi_token.clone(),
1808 }
1809 }
1810}
1811#[cfg(feature = "full")]
1812#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1813impl Clone for TraitItemFn {
1814 fn clone(&self) -> Self {
1815 TraitItemFn {
1816 attrs: self.attrs.clone(),
1817 sig: self.sig.clone(),
1818 default: self.default.clone(),
1819 semi_token: self.semi_token.clone(),
1820 }
1821 }
1822}
1823#[cfg(feature = "full")]
1824#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1825impl Clone for TraitItemMacro {
1826 fn clone(&self) -> Self {
1827 TraitItemMacro {
1828 attrs: self.attrs.clone(),
1829 mac: self.mac.clone(),
1830 semi_token: self.semi_token.clone(),
1831 }
1832 }
1833}
1834#[cfg(feature = "full")]
1835#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1836impl Clone for TraitItemType {
1837 fn clone(&self) -> Self {
1838 TraitItemType {
1839 attrs: self.attrs.clone(),
1840 type_token: self.type_token.clone(),
1841 ident: self.ident.clone(),
1842 generics: self.generics.clone(),
1843 colon_token: self.colon_token.clone(),
1844 bounds: self.bounds.clone(),
1845 default: self.default.clone(),
1846 semi_token: self.semi_token.clone(),
1847 }
1848 }
1849}
1850#[cfg(any(feature = "derive", feature = "full"))]
1851#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1852impl Clone for Type {
1853 fn clone(&self) -> Self {
1854 match self {
1855 Type::Array(v0) => Type::Array(v0.clone()),
1856 Type::BareFn(v0) => Type::BareFn(v0.clone()),
1857 Type::Group(v0) => Type::Group(v0.clone()),
1858 Type::ImplTrait(v0) => Type::ImplTrait(v0.clone()),
1859 Type::Infer(v0) => Type::Infer(v0.clone()),
1860 Type::Macro(v0) => Type::Macro(v0.clone()),
1861 Type::Never(v0) => Type::Never(v0.clone()),
1862 Type::Paren(v0) => Type::Paren(v0.clone()),
1863 Type::Path(v0) => Type::Path(v0.clone()),
1864 Type::Ptr(v0) => Type::Ptr(v0.clone()),
1865 Type::Reference(v0) => Type::Reference(v0.clone()),
1866 Type::Slice(v0) => Type::Slice(v0.clone()),
1867 Type::TraitObject(v0) => Type::TraitObject(v0.clone()),
1868 Type::Tuple(v0) => Type::Tuple(v0.clone()),
1869 Type::Verbatim(v0) => Type::Verbatim(v0.clone()),
1870 }
1871 }
1872}
1873#[cfg(any(feature = "derive", feature = "full"))]
1874#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1875impl Clone for TypeArray {
1876 fn clone(&self) -> Self {
1877 TypeArray {
1878 bracket_token: self.bracket_token.clone(),
1879 elem: self.elem.clone(),
1880 semi_token: self.semi_token.clone(),
1881 len: self.len.clone(),
1882 }
1883 }
1884}
1885#[cfg(any(feature = "derive", feature = "full"))]
1886#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1887impl Clone for TypeBareFn {
1888 fn clone(&self) -> Self {
1889 TypeBareFn {
1890 lifetimes: self.lifetimes.clone(),
1891 unsafety: self.unsafety.clone(),
1892 abi: self.abi.clone(),
1893 fn_token: self.fn_token.clone(),
1894 paren_token: self.paren_token.clone(),
1895 inputs: self.inputs.clone(),
1896 variadic: self.variadic.clone(),
1897 output: self.output.clone(),
1898 }
1899 }
1900}
1901#[cfg(any(feature = "derive", feature = "full"))]
1902#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1903impl Clone for TypeGroup {
1904 fn clone(&self) -> Self {
1905 TypeGroup {
1906 group_token: self.group_token.clone(),
1907 elem: self.elem.clone(),
1908 }
1909 }
1910}
1911#[cfg(any(feature = "derive", feature = "full"))]
1912#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1913impl Clone for TypeImplTrait {
1914 fn clone(&self) -> Self {
1915 TypeImplTrait {
1916 impl_token: self.impl_token.clone(),
1917 bounds: self.bounds.clone(),
1918 }
1919 }
1920}
1921#[cfg(any(feature = "derive", feature = "full"))]
1922#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1923impl Clone for TypeInfer {
1924 fn clone(&self) -> Self {
1925 TypeInfer {
1926 underscore_token: self.underscore_token.clone(),
1927 }
1928 }
1929}
1930#[cfg(any(feature = "derive", feature = "full"))]
1931#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1932impl Clone for TypeMacro {
1933 fn clone(&self) -> Self {
1934 TypeMacro { mac: self.mac.clone() }
1935 }
1936}
1937#[cfg(any(feature = "derive", feature = "full"))]
1938#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1939impl Clone for TypeNever {
1940 fn clone(&self) -> Self {
1941 TypeNever {
1942 bang_token: self.bang_token.clone(),
1943 }
1944 }
1945}
1946#[cfg(any(feature = "derive", feature = "full"))]
1947#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1948impl Clone for TypeParam {
1949 fn clone(&self) -> Self {
1950 TypeParam {
1951 attrs: self.attrs.clone(),
1952 ident: self.ident.clone(),
1953 colon_token: self.colon_token.clone(),
1954 bounds: self.bounds.clone(),
1955 eq_token: self.eq_token.clone(),
1956 default: self.default.clone(),
1957 }
1958 }
1959}
1960#[cfg(any(feature = "derive", feature = "full"))]
1961#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1962impl Clone for TypeParamBound {
1963 fn clone(&self) -> Self {
1964 match self {
1965 TypeParamBound::Trait(v0) => TypeParamBound::Trait(v0.clone()),
1966 TypeParamBound::Lifetime(v0) => TypeParamBound::Lifetime(v0.clone()),
1967 TypeParamBound::Verbatim(v0) => TypeParamBound::Verbatim(v0.clone()),
1968 }
1969 }
1970}
1971#[cfg(any(feature = "derive", feature = "full"))]
1972#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1973impl Clone for TypeParen {
1974 fn clone(&self) -> Self {
1975 TypeParen {
1976 paren_token: self.paren_token.clone(),
1977 elem: self.elem.clone(),
1978 }
1979 }
1980}
1981#[cfg(any(feature = "derive", feature = "full"))]
1982#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1983impl Clone for TypePath {
1984 fn clone(&self) -> Self {
1985 TypePath {
1986 qself: self.qself.clone(),
1987 path: self.path.clone(),
1988 }
1989 }
1990}
1991#[cfg(any(feature = "derive", feature = "full"))]
1992#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
1993impl Clone for TypePtr {
1994 fn clone(&self) -> Self {
1995 TypePtr {
1996 star_token: self.star_token.clone(),
1997 const_token: self.const_token.clone(),
1998 mutability: self.mutability.clone(),
1999 elem: self.elem.clone(),
2000 }
2001 }
2002}
2003#[cfg(any(feature = "derive", feature = "full"))]
2004#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2005impl Clone for TypeReference {
2006 fn clone(&self) -> Self {
2007 TypeReference {
2008 and_token: self.and_token.clone(),
2009 lifetime: self.lifetime.clone(),
2010 mutability: self.mutability.clone(),
2011 elem: self.elem.clone(),
2012 }
2013 }
2014}
2015#[cfg(any(feature = "derive", feature = "full"))]
2016#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2017impl Clone for TypeSlice {
2018 fn clone(&self) -> Self {
2019 TypeSlice {
2020 bracket_token: self.bracket_token.clone(),
2021 elem: self.elem.clone(),
2022 }
2023 }
2024}
2025#[cfg(any(feature = "derive", feature = "full"))]
2026#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2027impl Clone for TypeTraitObject {
2028 fn clone(&self) -> Self {
2029 TypeTraitObject {
2030 dyn_token: self.dyn_token.clone(),
2031 bounds: self.bounds.clone(),
2032 }
2033 }
2034}
2035#[cfg(any(feature = "derive", feature = "full"))]
2036#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2037impl Clone for TypeTuple {
2038 fn clone(&self) -> Self {
2039 TypeTuple {
2040 paren_token: self.paren_token.clone(),
2041 elems: self.elems.clone(),
2042 }
2043 }
2044}
2045#[cfg(any(feature = "derive", feature = "full"))]
2046#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2047impl Copy for UnOp {}
2048#[cfg(any(feature = "derive", feature = "full"))]
2049#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2050impl Clone for UnOp {
2051 fn clone(&self) -> Self {
2052 *self
2053 }
2054}
2055#[cfg(feature = "full")]
2056#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2057impl Clone for UseGlob {
2058 fn clone(&self) -> Self {
2059 UseGlob {
2060 star_token: self.star_token.clone(),
2061 }
2062 }
2063}
2064#[cfg(feature = "full")]
2065#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2066impl Clone for UseGroup {
2067 fn clone(&self) -> Self {
2068 UseGroup {
2069 brace_token: self.brace_token.clone(),
2070 items: self.items.clone(),
2071 }
2072 }
2073}
2074#[cfg(feature = "full")]
2075#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2076impl Clone for UseName {
2077 fn clone(&self) -> Self {
2078 UseName {
2079 ident: self.ident.clone(),
2080 }
2081 }
2082}
2083#[cfg(feature = "full")]
2084#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2085impl Clone for UsePath {
2086 fn clone(&self) -> Self {
2087 UsePath {
2088 ident: self.ident.clone(),
2089 colon2_token: self.colon2_token.clone(),
2090 tree: self.tree.clone(),
2091 }
2092 }
2093}
2094#[cfg(feature = "full")]
2095#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2096impl Clone for UseRename {
2097 fn clone(&self) -> Self {
2098 UseRename {
2099 ident: self.ident.clone(),
2100 as_token: self.as_token.clone(),
2101 rename: self.rename.clone(),
2102 }
2103 }
2104}
2105#[cfg(feature = "full")]
2106#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2107impl Clone for UseTree {
2108 fn clone(&self) -> Self {
2109 match self {
2110 UseTree::Path(v0) => UseTree::Path(v0.clone()),
2111 UseTree::Name(v0) => UseTree::Name(v0.clone()),
2112 UseTree::Rename(v0) => UseTree::Rename(v0.clone()),
2113 UseTree::Glob(v0) => UseTree::Glob(v0.clone()),
2114 UseTree::Group(v0) => UseTree::Group(v0.clone()),
2115 }
2116 }
2117}
2118#[cfg(feature = "full")]
2119#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2120impl Clone for Variadic {
2121 fn clone(&self) -> Self {
2122 Variadic {
2123 attrs: self.attrs.clone(),
2124 pat: self.pat.clone(),
2125 dots: self.dots.clone(),
2126 comma: self.comma.clone(),
2127 }
2128 }
2129}
2130#[cfg(any(feature = "derive", feature = "full"))]
2131#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2132impl Clone for Variant {
2133 fn clone(&self) -> Self {
2134 Variant {
2135 attrs: self.attrs.clone(),
2136 ident: self.ident.clone(),
2137 fields: self.fields.clone(),
2138 discriminant: self.discriminant.clone(),
2139 }
2140 }
2141}
2142#[cfg(any(feature = "derive", feature = "full"))]
2143#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2144impl Clone for VisRestricted {
2145 fn clone(&self) -> Self {
2146 VisRestricted {
2147 pub_token: self.pub_token.clone(),
2148 paren_token: self.paren_token.clone(),
2149 in_token: self.in_token.clone(),
2150 path: self.path.clone(),
2151 }
2152 }
2153}
2154#[cfg(any(feature = "derive", feature = "full"))]
2155#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2156impl Clone for Visibility {
2157 fn clone(&self) -> Self {
2158 match self {
2159 Visibility::Public(v0) => Visibility::Public(v0.clone()),
2160 Visibility::Restricted(v0) => Visibility::Restricted(v0.clone()),
2161 Visibility::Inherited => Visibility::Inherited,
2162 }
2163 }
2164}
2165#[cfg(any(feature = "derive", feature = "full"))]
2166#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2167impl Clone for WhereClause {
2168 fn clone(&self) -> Self {
2169 WhereClause {
2170 where_token: self.where_token.clone(),
2171 predicates: self.predicates.clone(),
2172 }
2173 }
2174}
2175#[cfg(any(feature = "derive", feature = "full"))]
2176#[cfg_attr(doc_cfg, doc(cfg(feature = "clone-impls")))]
2177impl Clone for WherePredicate {
2178 fn clone(&self) -> Self {
2179 match self {
2180 WherePredicate::Lifetime(v0) => WherePredicate::Lifetime(v0.clone()),
2181 WherePredicate::Type(v0) => WherePredicate::Type(v0.clone()),
2182 }
2183 }
2184}
2185