1 // This file is @generated by syn-internal-codegen.
2 // It is not intended for manual editing.
4 #![allow(clippy::clone_on_copy, clippy::expl_impl_clone_on_copy)]
6 #[cfg(any(feature = "derive", feature = "full"))]
8 fn clone(&self) -> Self {
10 extern_token
: self.extern_token
.clone(),
11 name
: self.name
.clone(),
15 #[cfg(any(feature = "derive", feature = "full"))]
16 impl Clone
for AngleBracketedGenericArguments
{
17 fn clone(&self) -> Self {
18 AngleBracketedGenericArguments
{
19 colon2_token
: self.colon2_token
.clone(),
20 lt_token
: self.lt_token
.clone(),
21 args
: self.args
.clone(),
22 gt_token
: self.gt_token
.clone(),
26 #[cfg(feature = "full")]
28 fn clone(&self) -> Self {
30 attrs
: self.attrs
.clone(),
31 pat
: self.pat
.clone(),
32 guard
: self.guard
.clone(),
33 fat_arrow_token
: self.fat_arrow_token
.clone(),
34 body
: self.body
.clone(),
35 comma
: self.comma
.clone(),
39 #[cfg(any(feature = "derive", feature = "full"))]
40 impl Copy
for AttrStyle {}
41 #[cfg(any(feature = "derive", feature = "full"))]
42 impl Clone
for AttrStyle
{
43 fn clone(&self) -> Self {
47 #[cfg(any(feature = "derive", feature = "full"))]
48 impl Clone
for Attribute
{
49 fn clone(&self) -> Self {
51 pound_token
: self.pound_token
.clone(),
52 style
: self.style
.clone(),
53 bracket_token
: self.bracket_token
.clone(),
54 path
: self.path
.clone(),
55 tokens
: self.tokens
.clone(),
59 #[cfg(any(feature = "derive", feature = "full"))]
60 impl Clone
for BareFnArg
{
61 fn clone(&self) -> Self {
63 attrs
: self.attrs
.clone(),
64 name
: self.name
.clone(),
69 #[cfg(any(feature = "derive", feature = "full"))]
70 impl Copy
for BinOp {}
71 #[cfg(any(feature = "derive", feature = "full"))]
72 impl Clone
for BinOp
{
73 fn clone(&self) -> Self {
77 #[cfg(any(feature = "derive", feature = "full"))]
78 impl Clone
for Binding
{
79 fn clone(&self) -> Self {
81 ident
: self.ident
.clone(),
82 eq_token
: self.eq_token
.clone(),
87 #[cfg(feature = "full")]
88 impl Clone
for Block
{
89 fn clone(&self) -> Self {
91 brace_token
: self.brace_token
.clone(),
92 stmts
: self.stmts
.clone(),
96 #[cfg(any(feature = "derive", feature = "full"))]
97 impl Clone
for BoundLifetimes
{
98 fn clone(&self) -> Self {
100 for_token
: self.for_token
.clone(),
101 lt_token
: self.lt_token
.clone(),
102 lifetimes
: self.lifetimes
.clone(),
103 gt_token
: self.gt_token
.clone(),
107 #[cfg(any(feature = "derive", feature = "full"))]
108 impl Clone
for ConstParam
{
109 fn clone(&self) -> Self {
111 attrs
: self.attrs
.clone(),
112 const_token
: self.const_token
.clone(),
113 ident
: self.ident
.clone(),
114 colon_token
: self.colon_token
.clone(),
116 eq_token
: self.eq_token
.clone(),
117 default: self.default.clone(),
121 #[cfg(any(feature = "derive", feature = "full"))]
122 impl Clone
for Constraint
{
123 fn clone(&self) -> Self {
125 ident
: self.ident
.clone(),
126 colon_token
: self.colon_token
.clone(),
127 bounds
: self.bounds
.clone(),
131 #[cfg(feature = "derive")]
132 impl Clone
for Data
{
133 fn clone(&self) -> Self {
135 Data
::Struct(v0
) => Data
::Struct(v0
.clone()),
136 Data
::Enum(v0
) => Data
::Enum(v0
.clone()),
137 Data
::Union(v0
) => Data
::Union(v0
.clone()),
141 #[cfg(feature = "derive")]
142 impl Clone
for DataEnum
{
143 fn clone(&self) -> Self {
145 enum_token
: self.enum_token
.clone(),
146 brace_token
: self.brace_token
.clone(),
147 variants
: self.variants
.clone(),
151 #[cfg(feature = "derive")]
152 impl Clone
for DataStruct
{
153 fn clone(&self) -> Self {
155 struct_token
: self.struct_token
.clone(),
156 fields
: self.fields
.clone(),
157 semi_token
: self.semi_token
.clone(),
161 #[cfg(feature = "derive")]
162 impl Clone
for DataUnion
{
163 fn clone(&self) -> Self {
165 union_token
: self.union_token
.clone(),
166 fields
: self.fields
.clone(),
170 #[cfg(feature = "derive")]
171 impl Clone
for DeriveInput
{
172 fn clone(&self) -> Self {
174 attrs
: self.attrs
.clone(),
175 vis
: self.vis
.clone(),
176 ident
: self.ident
.clone(),
177 generics
: self.generics
.clone(),
178 data
: self.data
.clone(),
182 #[cfg(any(feature = "derive", feature = "full"))]
183 impl Clone
for Expr
{
184 fn clone(&self) -> Self {
186 #[cfg(feature = "full")]
187 Expr
::Array(v0
) => Expr
::Array(v0
.clone()),
188 #[cfg(feature = "full")]
189 Expr
::Assign(v0
) => Expr
::Assign(v0
.clone()),
190 #[cfg(feature = "full")]
191 Expr
::AssignOp(v0
) => Expr
::AssignOp(v0
.clone()),
192 #[cfg(feature = "full")]
193 Expr
::Async(v0
) => Expr
::Async(v0
.clone()),
194 #[cfg(feature = "full")]
195 Expr
::Await(v0
) => Expr
::Await(v0
.clone()),
196 Expr
::Binary(v0
) => Expr
::Binary(v0
.clone()),
197 #[cfg(feature = "full")]
198 Expr
::Block(v0
) => Expr
::Block(v0
.clone()),
199 #[cfg(feature = "full")]
200 Expr
::Box(v0
) => Expr
::Box(v0
.clone()),
201 #[cfg(feature = "full")]
202 Expr
::Break(v0
) => Expr
::Break(v0
.clone()),
203 Expr
::Call(v0
) => Expr
::Call(v0
.clone()),
204 Expr
::Cast(v0
) => Expr
::Cast(v0
.clone()),
205 #[cfg(feature = "full")]
206 Expr
::Closure(v0
) => Expr
::Closure(v0
.clone()),
207 #[cfg(feature = "full")]
208 Expr
::Continue(v0
) => Expr
::Continue(v0
.clone()),
209 Expr
::Field(v0
) => Expr
::Field(v0
.clone()),
210 #[cfg(feature = "full")]
211 Expr
::ForLoop(v0
) => Expr
::ForLoop(v0
.clone()),
212 #[cfg(feature = "full")]
213 Expr
::Group(v0
) => Expr
::Group(v0
.clone()),
214 #[cfg(feature = "full")]
215 Expr
::If(v0
) => Expr
::If(v0
.clone()),
216 Expr
::Index(v0
) => Expr
::Index(v0
.clone()),
217 #[cfg(feature = "full")]
218 Expr
::Let(v0
) => Expr
::Let(v0
.clone()),
219 Expr
::Lit(v0
) => Expr
::Lit(v0
.clone()),
220 #[cfg(feature = "full")]
221 Expr
::Loop(v0
) => Expr
::Loop(v0
.clone()),
222 #[cfg(feature = "full")]
223 Expr
::Macro(v0
) => Expr
::Macro(v0
.clone()),
224 #[cfg(feature = "full")]
225 Expr
::Match(v0
) => Expr
::Match(v0
.clone()),
226 #[cfg(feature = "full")]
227 Expr
::MethodCall(v0
) => Expr
::MethodCall(v0
.clone()),
228 Expr
::Paren(v0
) => Expr
::Paren(v0
.clone()),
229 Expr
::Path(v0
) => Expr
::Path(v0
.clone()),
230 #[cfg(feature = "full")]
231 Expr
::Range(v0
) => Expr
::Range(v0
.clone()),
232 #[cfg(feature = "full")]
233 Expr
::Reference(v0
) => Expr
::Reference(v0
.clone()),
234 #[cfg(feature = "full")]
235 Expr
::Repeat(v0
) => Expr
::Repeat(v0
.clone()),
236 #[cfg(feature = "full")]
237 Expr
::Return(v0
) => Expr
::Return(v0
.clone()),
238 #[cfg(feature = "full")]
239 Expr
::Struct(v0
) => Expr
::Struct(v0
.clone()),
240 #[cfg(feature = "full")]
241 Expr
::Try(v0
) => Expr
::Try(v0
.clone()),
242 #[cfg(feature = "full")]
243 Expr
::TryBlock(v0
) => Expr
::TryBlock(v0
.clone()),
244 #[cfg(feature = "full")]
245 Expr
::Tuple(v0
) => Expr
::Tuple(v0
.clone()),
246 #[cfg(feature = "full")]
247 Expr
::Type(v0
) => Expr
::Type(v0
.clone()),
248 Expr
::Unary(v0
) => Expr
::Unary(v0
.clone()),
249 #[cfg(feature = "full")]
250 Expr
::Unsafe(v0
) => Expr
::Unsafe(v0
.clone()),
251 Expr
::Verbatim(v0
) => Expr
::Verbatim(v0
.clone()),
252 #[cfg(feature = "full")]
253 Expr
::While(v0
) => Expr
::While(v0
.clone()),
254 #[cfg(feature = "full")]
255 Expr
::Yield(v0
) => Expr
::Yield(v0
.clone()),
260 #[cfg(feature = "full")]
261 impl Clone
for ExprArray
{
262 fn clone(&self) -> Self {
264 attrs
: self.attrs
.clone(),
265 bracket_token
: self.bracket_token
.clone(),
266 elems
: self.elems
.clone(),
270 #[cfg(feature = "full")]
271 impl Clone
for ExprAssign
{
272 fn clone(&self) -> Self {
274 attrs
: self.attrs
.clone(),
275 left
: self.left
.clone(),
276 eq_token
: self.eq_token
.clone(),
277 right
: self.right
.clone(),
281 #[cfg(feature = "full")]
282 impl Clone
for ExprAssignOp
{
283 fn clone(&self) -> Self {
285 attrs
: self.attrs
.clone(),
286 left
: self.left
.clone(),
288 right
: self.right
.clone(),
292 #[cfg(feature = "full")]
293 impl Clone
for ExprAsync
{
294 fn clone(&self) -> Self {
296 attrs
: self.attrs
.clone(),
297 async_token
: self.async_token
.clone(),
298 capture
: self.capture
.clone(),
299 block
: self.block
.clone(),
303 #[cfg(feature = "full")]
304 impl Clone
for ExprAwait
{
305 fn clone(&self) -> Self {
307 attrs
: self.attrs
.clone(),
308 base
: self.base
.clone(),
309 dot_token
: self.dot_token
.clone(),
310 await_token
: self.await_token
.clone(),
314 #[cfg(any(feature = "derive", feature = "full"))]
315 impl Clone
for ExprBinary
{
316 fn clone(&self) -> Self {
318 attrs
: self.attrs
.clone(),
319 left
: self.left
.clone(),
321 right
: self.right
.clone(),
325 #[cfg(feature = "full")]
326 impl Clone
for ExprBlock
{
327 fn clone(&self) -> Self {
329 attrs
: self.attrs
.clone(),
330 label
: self.label
.clone(),
331 block
: self.block
.clone(),
335 #[cfg(feature = "full")]
336 impl Clone
for ExprBox
{
337 fn clone(&self) -> Self {
339 attrs
: self.attrs
.clone(),
340 box_token
: self.box_token
.clone(),
341 expr
: self.expr
.clone(),
345 #[cfg(feature = "full")]
346 impl Clone
for ExprBreak
{
347 fn clone(&self) -> Self {
349 attrs
: self.attrs
.clone(),
350 break_token
: self.break_token
.clone(),
351 label
: self.label
.clone(),
352 expr
: self.expr
.clone(),
356 #[cfg(any(feature = "derive", feature = "full"))]
357 impl Clone
for ExprCall
{
358 fn clone(&self) -> Self {
360 attrs
: self.attrs
.clone(),
361 func
: self.func
.clone(),
362 paren_token
: self.paren_token
.clone(),
363 args
: self.args
.clone(),
367 #[cfg(any(feature = "derive", feature = "full"))]
368 impl Clone
for ExprCast
{
369 fn clone(&self) -> Self {
371 attrs
: self.attrs
.clone(),
372 expr
: self.expr
.clone(),
373 as_token
: self.as_token
.clone(),
378 #[cfg(feature = "full")]
379 impl Clone
for ExprClosure
{
380 fn clone(&self) -> Self {
382 attrs
: self.attrs
.clone(),
383 asyncness
: self.asyncness
.clone(),
384 movability
: self.movability
.clone(),
385 capture
: self.capture
.clone(),
386 or1_token
: self.or1_token
.clone(),
387 inputs
: self.inputs
.clone(),
388 or2_token
: self.or2_token
.clone(),
389 output
: self.output
.clone(),
390 body
: self.body
.clone(),
394 #[cfg(feature = "full")]
395 impl Clone
for ExprContinue
{
396 fn clone(&self) -> Self {
398 attrs
: self.attrs
.clone(),
399 continue_token
: self.continue_token
.clone(),
400 label
: self.label
.clone(),
404 #[cfg(any(feature = "derive", feature = "full"))]
405 impl Clone
for ExprField
{
406 fn clone(&self) -> Self {
408 attrs
: self.attrs
.clone(),
409 base
: self.base
.clone(),
410 dot_token
: self.dot_token
.clone(),
411 member
: self.member
.clone(),
415 #[cfg(feature = "full")]
416 impl Clone
for ExprForLoop
{
417 fn clone(&self) -> Self {
419 attrs
: self.attrs
.clone(),
420 label
: self.label
.clone(),
421 for_token
: self.for_token
.clone(),
422 pat
: self.pat
.clone(),
423 in_token
: self.in_token
.clone(),
424 expr
: self.expr
.clone(),
425 body
: self.body
.clone(),
429 #[cfg(feature = "full")]
430 impl Clone
for ExprGroup
{
431 fn clone(&self) -> Self {
433 attrs
: self.attrs
.clone(),
434 group_token
: self.group_token
.clone(),
435 expr
: self.expr
.clone(),
439 #[cfg(feature = "full")]
440 impl Clone
for ExprIf
{
441 fn clone(&self) -> Self {
443 attrs
: self.attrs
.clone(),
444 if_token
: self.if_token
.clone(),
445 cond
: self.cond
.clone(),
446 then_branch
: self.then_branch
.clone(),
447 else_branch
: self.else_branch
.clone(),
451 #[cfg(any(feature = "derive", feature = "full"))]
452 impl Clone
for ExprIndex
{
453 fn clone(&self) -> Self {
455 attrs
: self.attrs
.clone(),
456 expr
: self.expr
.clone(),
457 bracket_token
: self.bracket_token
.clone(),
458 index
: self.index
.clone(),
462 #[cfg(feature = "full")]
463 impl Clone
for ExprLet
{
464 fn clone(&self) -> Self {
466 attrs
: self.attrs
.clone(),
467 let_token
: self.let_token
.clone(),
468 pat
: self.pat
.clone(),
469 eq_token
: self.eq_token
.clone(),
470 expr
: self.expr
.clone(),
474 #[cfg(any(feature = "derive", feature = "full"))]
475 impl Clone
for ExprLit
{
476 fn clone(&self) -> Self {
478 attrs
: self.attrs
.clone(),
479 lit
: self.lit
.clone(),
483 #[cfg(feature = "full")]
484 impl Clone
for ExprLoop
{
485 fn clone(&self) -> Self {
487 attrs
: self.attrs
.clone(),
488 label
: self.label
.clone(),
489 loop_token
: self.loop_token
.clone(),
490 body
: self.body
.clone(),
494 #[cfg(feature = "full")]
495 impl Clone
for ExprMacro
{
496 fn clone(&self) -> Self {
498 attrs
: self.attrs
.clone(),
499 mac
: self.mac
.clone(),
503 #[cfg(feature = "full")]
504 impl Clone
for ExprMatch
{
505 fn clone(&self) -> Self {
507 attrs
: self.attrs
.clone(),
508 match_token
: self.match_token
.clone(),
509 expr
: self.expr
.clone(),
510 brace_token
: self.brace_token
.clone(),
511 arms
: self.arms
.clone(),
515 #[cfg(feature = "full")]
516 impl Clone
for ExprMethodCall
{
517 fn clone(&self) -> Self {
519 attrs
: self.attrs
.clone(),
520 receiver
: self.receiver
.clone(),
521 dot_token
: self.dot_token
.clone(),
522 method
: self.method
.clone(),
523 turbofish
: self.turbofish
.clone(),
524 paren_token
: self.paren_token
.clone(),
525 args
: self.args
.clone(),
529 #[cfg(any(feature = "derive", feature = "full"))]
530 impl Clone
for ExprParen
{
531 fn clone(&self) -> Self {
533 attrs
: self.attrs
.clone(),
534 paren_token
: self.paren_token
.clone(),
535 expr
: self.expr
.clone(),
539 #[cfg(any(feature = "derive", feature = "full"))]
540 impl Clone
for ExprPath
{
541 fn clone(&self) -> Self {
543 attrs
: self.attrs
.clone(),
544 qself
: self.qself
.clone(),
545 path
: self.path
.clone(),
549 #[cfg(feature = "full")]
550 impl Clone
for ExprRange
{
551 fn clone(&self) -> Self {
553 attrs
: self.attrs
.clone(),
554 from
: self.from
.clone(),
555 limits
: self.limits
.clone(),
560 #[cfg(feature = "full")]
561 impl Clone
for ExprReference
{
562 fn clone(&self) -> Self {
564 attrs
: self.attrs
.clone(),
565 and_token
: self.and_token
.clone(),
566 raw
: self.raw
.clone(),
567 mutability
: self.mutability
.clone(),
568 expr
: self.expr
.clone(),
572 #[cfg(feature = "full")]
573 impl Clone
for ExprRepeat
{
574 fn clone(&self) -> Self {
576 attrs
: self.attrs
.clone(),
577 bracket_token
: self.bracket_token
.clone(),
578 expr
: self.expr
.clone(),
579 semi_token
: self.semi_token
.clone(),
580 len
: self.len
.clone(),
584 #[cfg(feature = "full")]
585 impl Clone
for ExprReturn
{
586 fn clone(&self) -> Self {
588 attrs
: self.attrs
.clone(),
589 return_token
: self.return_token
.clone(),
590 expr
: self.expr
.clone(),
594 #[cfg(feature = "full")]
595 impl Clone
for ExprStruct
{
596 fn clone(&self) -> Self {
598 attrs
: self.attrs
.clone(),
599 path
: self.path
.clone(),
600 brace_token
: self.brace_token
.clone(),
601 fields
: self.fields
.clone(),
602 dot2_token
: self.dot2_token
.clone(),
603 rest
: self.rest
.clone(),
607 #[cfg(feature = "full")]
608 impl Clone
for ExprTry
{
609 fn clone(&self) -> Self {
611 attrs
: self.attrs
.clone(),
612 expr
: self.expr
.clone(),
613 question_token
: self.question_token
.clone(),
617 #[cfg(feature = "full")]
618 impl Clone
for ExprTryBlock
{
619 fn clone(&self) -> Self {
621 attrs
: self.attrs
.clone(),
622 try_token
: self.try_token
.clone(),
623 block
: self.block
.clone(),
627 #[cfg(feature = "full")]
628 impl Clone
for ExprTuple
{
629 fn clone(&self) -> Self {
631 attrs
: self.attrs
.clone(),
632 paren_token
: self.paren_token
.clone(),
633 elems
: self.elems
.clone(),
637 #[cfg(feature = "full")]
638 impl Clone
for ExprType
{
639 fn clone(&self) -> Self {
641 attrs
: self.attrs
.clone(),
642 expr
: self.expr
.clone(),
643 colon_token
: self.colon_token
.clone(),
648 #[cfg(any(feature = "derive", feature = "full"))]
649 impl Clone
for ExprUnary
{
650 fn clone(&self) -> Self {
652 attrs
: self.attrs
.clone(),
654 expr
: self.expr
.clone(),
658 #[cfg(feature = "full")]
659 impl Clone
for ExprUnsafe
{
660 fn clone(&self) -> Self {
662 attrs
: self.attrs
.clone(),
663 unsafe_token
: self.unsafe_token
.clone(),
664 block
: self.block
.clone(),
668 #[cfg(feature = "full")]
669 impl Clone
for ExprWhile
{
670 fn clone(&self) -> Self {
672 attrs
: self.attrs
.clone(),
673 label
: self.label
.clone(),
674 while_token
: self.while_token
.clone(),
675 cond
: self.cond
.clone(),
676 body
: self.body
.clone(),
680 #[cfg(feature = "full")]
681 impl Clone
for ExprYield
{
682 fn clone(&self) -> Self {
684 attrs
: self.attrs
.clone(),
685 yield_token
: self.yield_token
.clone(),
686 expr
: self.expr
.clone(),
690 #[cfg(any(feature = "derive", feature = "full"))]
691 impl Clone
for Field
{
692 fn clone(&self) -> Self {
694 attrs
: self.attrs
.clone(),
695 vis
: self.vis
.clone(),
696 ident
: self.ident
.clone(),
697 colon_token
: self.colon_token
.clone(),
702 #[cfg(feature = "full")]
703 impl Clone
for FieldPat
{
704 fn clone(&self) -> Self {
706 attrs
: self.attrs
.clone(),
707 member
: self.member
.clone(),
708 colon_token
: self.colon_token
.clone(),
709 pat
: self.pat
.clone(),
713 #[cfg(feature = "full")]
714 impl Clone
for FieldValue
{
715 fn clone(&self) -> Self {
717 attrs
: self.attrs
.clone(),
718 member
: self.member
.clone(),
719 colon_token
: self.colon_token
.clone(),
720 expr
: self.expr
.clone(),
724 #[cfg(any(feature = "derive", feature = "full"))]
725 impl Clone
for Fields
{
726 fn clone(&self) -> Self {
728 Fields
::Named(v0
) => Fields
::Named(v0
.clone()),
729 Fields
::Unnamed(v0
) => Fields
::Unnamed(v0
.clone()),
730 Fields
::Unit
=> Fields
::Unit
,
734 #[cfg(any(feature = "derive", feature = "full"))]
735 impl Clone
for FieldsNamed
{
736 fn clone(&self) -> Self {
738 brace_token
: self.brace_token
.clone(),
739 named
: self.named
.clone(),
743 #[cfg(any(feature = "derive", feature = "full"))]
744 impl Clone
for FieldsUnnamed
{
745 fn clone(&self) -> Self {
747 paren_token
: self.paren_token
.clone(),
748 unnamed
: self.unnamed
.clone(),
752 #[cfg(feature = "full")]
753 impl Clone
for File
{
754 fn clone(&self) -> Self {
756 shebang
: self.shebang
.clone(),
757 attrs
: self.attrs
.clone(),
758 items
: self.items
.clone(),
762 #[cfg(feature = "full")]
763 impl Clone
for FnArg
{
764 fn clone(&self) -> Self {
766 FnArg
::Receiver(v0
) => FnArg
::Receiver(v0
.clone()),
767 FnArg
::Typed(v0
) => FnArg
::Typed(v0
.clone()),
771 #[cfg(feature = "full")]
772 impl Clone
for ForeignItem
{
773 fn clone(&self) -> Self {
775 ForeignItem
::Fn(v0
) => ForeignItem
::Fn(v0
.clone()),
776 ForeignItem
::Static(v0
) => ForeignItem
::Static(v0
.clone()),
777 ForeignItem
::Type(v0
) => ForeignItem
::Type(v0
.clone()),
778 ForeignItem
::Macro(v0
) => ForeignItem
::Macro(v0
.clone()),
779 ForeignItem
::Verbatim(v0
) => ForeignItem
::Verbatim(v0
.clone()),
784 #[cfg(feature = "full")]
785 impl Clone
for ForeignItemFn
{
786 fn clone(&self) -> Self {
788 attrs
: self.attrs
.clone(),
789 vis
: self.vis
.clone(),
790 sig
: self.sig
.clone(),
791 semi_token
: self.semi_token
.clone(),
795 #[cfg(feature = "full")]
796 impl Clone
for ForeignItemMacro
{
797 fn clone(&self) -> Self {
799 attrs
: self.attrs
.clone(),
800 mac
: self.mac
.clone(),
801 semi_token
: self.semi_token
.clone(),
805 #[cfg(feature = "full")]
806 impl Clone
for ForeignItemStatic
{
807 fn clone(&self) -> Self {
809 attrs
: self.attrs
.clone(),
810 vis
: self.vis
.clone(),
811 static_token
: self.static_token
.clone(),
812 mutability
: self.mutability
.clone(),
813 ident
: self.ident
.clone(),
814 colon_token
: self.colon_token
.clone(),
816 semi_token
: self.semi_token
.clone(),
820 #[cfg(feature = "full")]
821 impl Clone
for ForeignItemType
{
822 fn clone(&self) -> Self {
824 attrs
: self.attrs
.clone(),
825 vis
: self.vis
.clone(),
826 type_token
: self.type_token
.clone(),
827 ident
: self.ident
.clone(),
828 semi_token
: self.semi_token
.clone(),
832 #[cfg(any(feature = "derive", feature = "full"))]
833 impl Clone
for GenericArgument
{
834 fn clone(&self) -> Self {
836 GenericArgument
::Lifetime(v0
) => GenericArgument
::Lifetime(v0
.clone()),
837 GenericArgument
::Type(v0
) => GenericArgument
::Type(v0
.clone()),
838 GenericArgument
::Binding(v0
) => GenericArgument
::Binding(v0
.clone()),
839 GenericArgument
::Constraint(v0
) => GenericArgument
::Constraint(v0
.clone()),
840 GenericArgument
::Const(v0
) => GenericArgument
::Const(v0
.clone()),
844 #[cfg(feature = "full")]
845 impl Clone
for GenericMethodArgument
{
846 fn clone(&self) -> Self {
848 GenericMethodArgument
::Type(v0
) => GenericMethodArgument
::Type(v0
.clone()),
849 GenericMethodArgument
::Const(v0
) => GenericMethodArgument
::Const(v0
.clone()),
853 #[cfg(any(feature = "derive", feature = "full"))]
854 impl Clone
for GenericParam
{
855 fn clone(&self) -> Self {
857 GenericParam
::Type(v0
) => GenericParam
::Type(v0
.clone()),
858 GenericParam
::Lifetime(v0
) => GenericParam
::Lifetime(v0
.clone()),
859 GenericParam
::Const(v0
) => GenericParam
::Const(v0
.clone()),
863 #[cfg(any(feature = "derive", feature = "full"))]
864 impl Clone
for Generics
{
865 fn clone(&self) -> Self {
867 lt_token
: self.lt_token
.clone(),
868 params
: self.params
.clone(),
869 gt_token
: self.gt_token
.clone(),
870 where_clause
: self.where_clause
.clone(),
874 #[cfg(feature = "full")]
875 impl Clone
for ImplItem
{
876 fn clone(&self) -> Self {
878 ImplItem
::Const(v0
) => ImplItem
::Const(v0
.clone()),
879 ImplItem
::Method(v0
) => ImplItem
::Method(v0
.clone()),
880 ImplItem
::Type(v0
) => ImplItem
::Type(v0
.clone()),
881 ImplItem
::Macro(v0
) => ImplItem
::Macro(v0
.clone()),
882 ImplItem
::Verbatim(v0
) => ImplItem
::Verbatim(v0
.clone()),
887 #[cfg(feature = "full")]
888 impl Clone
for ImplItemConst
{
889 fn clone(&self) -> Self {
891 attrs
: self.attrs
.clone(),
892 vis
: self.vis
.clone(),
893 defaultness
: self.defaultness
.clone(),
894 const_token
: self.const_token
.clone(),
895 ident
: self.ident
.clone(),
896 colon_token
: self.colon_token
.clone(),
898 eq_token
: self.eq_token
.clone(),
899 expr
: self.expr
.clone(),
900 semi_token
: self.semi_token
.clone(),
904 #[cfg(feature = "full")]
905 impl Clone
for ImplItemMacro
{
906 fn clone(&self) -> Self {
908 attrs
: self.attrs
.clone(),
909 mac
: self.mac
.clone(),
910 semi_token
: self.semi_token
.clone(),
914 #[cfg(feature = "full")]
915 impl Clone
for ImplItemMethod
{
916 fn clone(&self) -> Self {
918 attrs
: self.attrs
.clone(),
919 vis
: self.vis
.clone(),
920 defaultness
: self.defaultness
.clone(),
921 sig
: self.sig
.clone(),
922 block
: self.block
.clone(),
926 #[cfg(feature = "full")]
927 impl Clone
for ImplItemType
{
928 fn clone(&self) -> Self {
930 attrs
: self.attrs
.clone(),
931 vis
: self.vis
.clone(),
932 defaultness
: self.defaultness
.clone(),
933 type_token
: self.type_token
.clone(),
934 ident
: self.ident
.clone(),
935 generics
: self.generics
.clone(),
936 eq_token
: self.eq_token
.clone(),
938 semi_token
: self.semi_token
.clone(),
942 #[cfg(any(feature = "derive", feature = "full"))]
943 impl Clone
for Index
{
944 fn clone(&self) -> Self {
946 index
: self.index
.clone(),
947 span
: self.span
.clone(),
951 #[cfg(feature = "full")]
952 impl Clone
for Item
{
953 fn clone(&self) -> Self {
955 Item
::Const(v0
) => Item
::Const(v0
.clone()),
956 Item
::Enum(v0
) => Item
::Enum(v0
.clone()),
957 Item
::ExternCrate(v0
) => Item
::ExternCrate(v0
.clone()),
958 Item
::Fn(v0
) => Item
::Fn(v0
.clone()),
959 Item
::ForeignMod(v0
) => Item
::ForeignMod(v0
.clone()),
960 Item
::Impl(v0
) => Item
::Impl(v0
.clone()),
961 Item
::Macro(v0
) => Item
::Macro(v0
.clone()),
962 Item
::Macro2(v0
) => Item
::Macro2(v0
.clone()),
963 Item
::Mod(v0
) => Item
::Mod(v0
.clone()),
964 Item
::Static(v0
) => Item
::Static(v0
.clone()),
965 Item
::Struct(v0
) => Item
::Struct(v0
.clone()),
966 Item
::Trait(v0
) => Item
::Trait(v0
.clone()),
967 Item
::TraitAlias(v0
) => Item
::TraitAlias(v0
.clone()),
968 Item
::Type(v0
) => Item
::Type(v0
.clone()),
969 Item
::Union(v0
) => Item
::Union(v0
.clone()),
970 Item
::Use(v0
) => Item
::Use(v0
.clone()),
971 Item
::Verbatim(v0
) => Item
::Verbatim(v0
.clone()),
976 #[cfg(feature = "full")]
977 impl Clone
for ItemConst
{
978 fn clone(&self) -> Self {
980 attrs
: self.attrs
.clone(),
981 vis
: self.vis
.clone(),
982 const_token
: self.const_token
.clone(),
983 ident
: self.ident
.clone(),
984 colon_token
: self.colon_token
.clone(),
986 eq_token
: self.eq_token
.clone(),
987 expr
: self.expr
.clone(),
988 semi_token
: self.semi_token
.clone(),
992 #[cfg(feature = "full")]
993 impl Clone
for ItemEnum
{
994 fn clone(&self) -> Self {
996 attrs
: self.attrs
.clone(),
997 vis
: self.vis
.clone(),
998 enum_token
: self.enum_token
.clone(),
999 ident
: self.ident
.clone(),
1000 generics
: self.generics
.clone(),
1001 brace_token
: self.brace_token
.clone(),
1002 variants
: self.variants
.clone(),
1006 #[cfg(feature = "full")]
1007 impl Clone
for ItemExternCrate
{
1008 fn clone(&self) -> Self {
1010 attrs
: self.attrs
.clone(),
1011 vis
: self.vis
.clone(),
1012 extern_token
: self.extern_token
.clone(),
1013 crate_token
: self.crate_token
.clone(),
1014 ident
: self.ident
.clone(),
1015 rename
: self.rename
.clone(),
1016 semi_token
: self.semi_token
.clone(),
1020 #[cfg(feature = "full")]
1021 impl Clone
for ItemFn
{
1022 fn clone(&self) -> Self {
1024 attrs
: self.attrs
.clone(),
1025 vis
: self.vis
.clone(),
1026 sig
: self.sig
.clone(),
1027 block
: self.block
.clone(),
1031 #[cfg(feature = "full")]
1032 impl Clone
for ItemForeignMod
{
1033 fn clone(&self) -> Self {
1035 attrs
: self.attrs
.clone(),
1036 abi
: self.abi
.clone(),
1037 brace_token
: self.brace_token
.clone(),
1038 items
: self.items
.clone(),
1042 #[cfg(feature = "full")]
1043 impl Clone
for ItemImpl
{
1044 fn clone(&self) -> Self {
1046 attrs
: self.attrs
.clone(),
1047 defaultness
: self.defaultness
.clone(),
1048 unsafety
: self.unsafety
.clone(),
1049 impl_token
: self.impl_token
.clone(),
1050 generics
: self.generics
.clone(),
1051 trait_
: self.trait_
.clone(),
1052 self_ty
: self.self_ty
.clone(),
1053 brace_token
: self.brace_token
.clone(),
1054 items
: self.items
.clone(),
1058 #[cfg(feature = "full")]
1059 impl Clone
for ItemMacro
{
1060 fn clone(&self) -> Self {
1062 attrs
: self.attrs
.clone(),
1063 ident
: self.ident
.clone(),
1064 mac
: self.mac
.clone(),
1065 semi_token
: self.semi_token
.clone(),
1069 #[cfg(feature = "full")]
1070 impl Clone
for ItemMacro2
{
1071 fn clone(&self) -> Self {
1073 attrs
: self.attrs
.clone(),
1074 vis
: self.vis
.clone(),
1075 macro_token
: self.macro_token
.clone(),
1076 ident
: self.ident
.clone(),
1077 rules
: self.rules
.clone(),
1081 #[cfg(feature = "full")]
1082 impl Clone
for ItemMod
{
1083 fn clone(&self) -> Self {
1085 attrs
: self.attrs
.clone(),
1086 vis
: self.vis
.clone(),
1087 mod_token
: self.mod_token
.clone(),
1088 ident
: self.ident
.clone(),
1089 content
: self.content
.clone(),
1090 semi
: self.semi
.clone(),
1094 #[cfg(feature = "full")]
1095 impl Clone
for ItemStatic
{
1096 fn clone(&self) -> Self {
1098 attrs
: self.attrs
.clone(),
1099 vis
: self.vis
.clone(),
1100 static_token
: self.static_token
.clone(),
1101 mutability
: self.mutability
.clone(),
1102 ident
: self.ident
.clone(),
1103 colon_token
: self.colon_token
.clone(),
1104 ty
: self.ty
.clone(),
1105 eq_token
: self.eq_token
.clone(),
1106 expr
: self.expr
.clone(),
1107 semi_token
: self.semi_token
.clone(),
1111 #[cfg(feature = "full")]
1112 impl Clone
for ItemStruct
{
1113 fn clone(&self) -> Self {
1115 attrs
: self.attrs
.clone(),
1116 vis
: self.vis
.clone(),
1117 struct_token
: self.struct_token
.clone(),
1118 ident
: self.ident
.clone(),
1119 generics
: self.generics
.clone(),
1120 fields
: self.fields
.clone(),
1121 semi_token
: self.semi_token
.clone(),
1125 #[cfg(feature = "full")]
1126 impl Clone
for ItemTrait
{
1127 fn clone(&self) -> Self {
1129 attrs
: self.attrs
.clone(),
1130 vis
: self.vis
.clone(),
1131 unsafety
: self.unsafety
.clone(),
1132 auto_token
: self.auto_token
.clone(),
1133 trait_token
: self.trait_token
.clone(),
1134 ident
: self.ident
.clone(),
1135 generics
: self.generics
.clone(),
1136 colon_token
: self.colon_token
.clone(),
1137 supertraits
: self.supertraits
.clone(),
1138 brace_token
: self.brace_token
.clone(),
1139 items
: self.items
.clone(),
1143 #[cfg(feature = "full")]
1144 impl Clone
for ItemTraitAlias
{
1145 fn clone(&self) -> Self {
1147 attrs
: self.attrs
.clone(),
1148 vis
: self.vis
.clone(),
1149 trait_token
: self.trait_token
.clone(),
1150 ident
: self.ident
.clone(),
1151 generics
: self.generics
.clone(),
1152 eq_token
: self.eq_token
.clone(),
1153 bounds
: self.bounds
.clone(),
1154 semi_token
: self.semi_token
.clone(),
1158 #[cfg(feature = "full")]
1159 impl Clone
for ItemType
{
1160 fn clone(&self) -> Self {
1162 attrs
: self.attrs
.clone(),
1163 vis
: self.vis
.clone(),
1164 type_token
: self.type_token
.clone(),
1165 ident
: self.ident
.clone(),
1166 generics
: self.generics
.clone(),
1167 eq_token
: self.eq_token
.clone(),
1168 ty
: self.ty
.clone(),
1169 semi_token
: self.semi_token
.clone(),
1173 #[cfg(feature = "full")]
1174 impl Clone
for ItemUnion
{
1175 fn clone(&self) -> Self {
1177 attrs
: self.attrs
.clone(),
1178 vis
: self.vis
.clone(),
1179 union_token
: self.union_token
.clone(),
1180 ident
: self.ident
.clone(),
1181 generics
: self.generics
.clone(),
1182 fields
: self.fields
.clone(),
1186 #[cfg(feature = "full")]
1187 impl Clone
for ItemUse
{
1188 fn clone(&self) -> Self {
1190 attrs
: self.attrs
.clone(),
1191 vis
: self.vis
.clone(),
1192 use_token
: self.use_token
.clone(),
1193 leading_colon
: self.leading_colon
.clone(),
1194 tree
: self.tree
.clone(),
1195 semi_token
: self.semi_token
.clone(),
1199 #[cfg(feature = "full")]
1200 impl Clone
for Label
{
1201 fn clone(&self) -> Self {
1203 name
: self.name
.clone(),
1204 colon_token
: self.colon_token
.clone(),
1208 #[cfg(any(feature = "derive", feature = "full"))]
1209 impl Clone
for LifetimeDef
{
1210 fn clone(&self) -> Self {
1212 attrs
: self.attrs
.clone(),
1213 lifetime
: self.lifetime
.clone(),
1214 colon_token
: self.colon_token
.clone(),
1215 bounds
: self.bounds
.clone(),
1219 impl Clone
for Lit
{
1220 fn clone(&self) -> Self {
1222 Lit
::Str(v0
) => Lit
::Str(v0
.clone()),
1223 Lit
::ByteStr(v0
) => Lit
::ByteStr(v0
.clone()),
1224 Lit
::Byte(v0
) => Lit
::Byte(v0
.clone()),
1225 Lit
::Char(v0
) => Lit
::Char(v0
.clone()),
1226 Lit
::Int(v0
) => Lit
::Int(v0
.clone()),
1227 Lit
::Float(v0
) => Lit
::Float(v0
.clone()),
1228 Lit
::Bool(v0
) => Lit
::Bool(v0
.clone()),
1229 Lit
::Verbatim(v0
) => Lit
::Verbatim(v0
.clone()),
1233 impl Clone
for LitBool
{
1234 fn clone(&self) -> Self {
1236 value
: self.value
.clone(),
1237 span
: self.span
.clone(),
1241 #[cfg(feature = "full")]
1242 impl Clone
for Local
{
1243 fn clone(&self) -> Self {
1245 attrs
: self.attrs
.clone(),
1246 let_token
: self.let_token
.clone(),
1247 pat
: self.pat
.clone(),
1248 init
: self.init
.clone(),
1249 semi_token
: self.semi_token
.clone(),
1253 #[cfg(any(feature = "derive", feature = "full"))]
1254 impl Clone
for Macro
{
1255 fn clone(&self) -> Self {
1257 path
: self.path
.clone(),
1258 bang_token
: self.bang_token
.clone(),
1259 delimiter
: self.delimiter
.clone(),
1260 tokens
: self.tokens
.clone(),
1264 #[cfg(any(feature = "derive", feature = "full"))]
1265 impl Clone
for MacroDelimiter
{
1266 fn clone(&self) -> Self {
1268 MacroDelimiter
::Paren(v0
) => MacroDelimiter
::Paren(v0
.clone()),
1269 MacroDelimiter
::Brace(v0
) => MacroDelimiter
::Brace(v0
.clone()),
1270 MacroDelimiter
::Bracket(v0
) => MacroDelimiter
::Bracket(v0
.clone()),
1274 #[cfg(any(feature = "derive", feature = "full"))]
1275 impl Clone
for Member
{
1276 fn clone(&self) -> Self {
1278 Member
::Named(v0
) => Member
::Named(v0
.clone()),
1279 Member
::Unnamed(v0
) => Member
::Unnamed(v0
.clone()),
1283 #[cfg(any(feature = "derive", feature = "full"))]
1284 impl Clone
for Meta
{
1285 fn clone(&self) -> Self {
1287 Meta
::Path(v0
) => Meta
::Path(v0
.clone()),
1288 Meta
::List(v0
) => Meta
::List(v0
.clone()),
1289 Meta
::NameValue(v0
) => Meta
::NameValue(v0
.clone()),
1293 #[cfg(any(feature = "derive", feature = "full"))]
1294 impl Clone
for MetaList
{
1295 fn clone(&self) -> Self {
1297 path
: self.path
.clone(),
1298 paren_token
: self.paren_token
.clone(),
1299 nested
: self.nested
.clone(),
1303 #[cfg(any(feature = "derive", feature = "full"))]
1304 impl Clone
for MetaNameValue
{
1305 fn clone(&self) -> Self {
1307 path
: self.path
.clone(),
1308 eq_token
: self.eq_token
.clone(),
1309 lit
: self.lit
.clone(),
1313 #[cfg(feature = "full")]
1314 impl Clone
for MethodTurbofish
{
1315 fn clone(&self) -> Self {
1317 colon2_token
: self.colon2_token
.clone(),
1318 lt_token
: self.lt_token
.clone(),
1319 args
: self.args
.clone(),
1320 gt_token
: self.gt_token
.clone(),
1324 #[cfg(any(feature = "derive", feature = "full"))]
1325 impl Clone
for NestedMeta
{
1326 fn clone(&self) -> Self {
1328 NestedMeta
::Meta(v0
) => NestedMeta
::Meta(v0
.clone()),
1329 NestedMeta
::Lit(v0
) => NestedMeta
::Lit(v0
.clone()),
1333 #[cfg(any(feature = "derive", feature = "full"))]
1334 impl Clone
for ParenthesizedGenericArguments
{
1335 fn clone(&self) -> Self {
1336 ParenthesizedGenericArguments
{
1337 paren_token
: self.paren_token
.clone(),
1338 inputs
: self.inputs
.clone(),
1339 output
: self.output
.clone(),
1343 #[cfg(feature = "full")]
1344 impl Clone
for Pat
{
1345 fn clone(&self) -> Self {
1347 Pat
::Box(v0
) => Pat
::Box(v0
.clone()),
1348 Pat
::Ident(v0
) => Pat
::Ident(v0
.clone()),
1349 Pat
::Lit(v0
) => Pat
::Lit(v0
.clone()),
1350 Pat
::Macro(v0
) => Pat
::Macro(v0
.clone()),
1351 Pat
::Or(v0
) => Pat
::Or(v0
.clone()),
1352 Pat
::Path(v0
) => Pat
::Path(v0
.clone()),
1353 Pat
::Range(v0
) => Pat
::Range(v0
.clone()),
1354 Pat
::Reference(v0
) => Pat
::Reference(v0
.clone()),
1355 Pat
::Rest(v0
) => Pat
::Rest(v0
.clone()),
1356 Pat
::Slice(v0
) => Pat
::Slice(v0
.clone()),
1357 Pat
::Struct(v0
) => Pat
::Struct(v0
.clone()),
1358 Pat
::Tuple(v0
) => Pat
::Tuple(v0
.clone()),
1359 Pat
::TupleStruct(v0
) => Pat
::TupleStruct(v0
.clone()),
1360 Pat
::Type(v0
) => Pat
::Type(v0
.clone()),
1361 Pat
::Verbatim(v0
) => Pat
::Verbatim(v0
.clone()),
1362 Pat
::Wild(v0
) => Pat
::Wild(v0
.clone()),
1363 _
=> unreachable
!(),
1367 #[cfg(feature = "full")]
1368 impl Clone
for PatBox
{
1369 fn clone(&self) -> Self {
1371 attrs
: self.attrs
.clone(),
1372 box_token
: self.box_token
.clone(),
1373 pat
: self.pat
.clone(),
1377 #[cfg(feature = "full")]
1378 impl Clone
for PatIdent
{
1379 fn clone(&self) -> Self {
1381 attrs
: self.attrs
.clone(),
1382 by_ref
: self.by_ref
.clone(),
1383 mutability
: self.mutability
.clone(),
1384 ident
: self.ident
.clone(),
1385 subpat
: self.subpat
.clone(),
1389 #[cfg(feature = "full")]
1390 impl Clone
for PatLit
{
1391 fn clone(&self) -> Self {
1393 attrs
: self.attrs
.clone(),
1394 expr
: self.expr
.clone(),
1398 #[cfg(feature = "full")]
1399 impl Clone
for PatMacro
{
1400 fn clone(&self) -> Self {
1402 attrs
: self.attrs
.clone(),
1403 mac
: self.mac
.clone(),
1407 #[cfg(feature = "full")]
1408 impl Clone
for PatOr
{
1409 fn clone(&self) -> Self {
1411 attrs
: self.attrs
.clone(),
1412 leading_vert
: self.leading_vert
.clone(),
1413 cases
: self.cases
.clone(),
1417 #[cfg(feature = "full")]
1418 impl Clone
for PatPath
{
1419 fn clone(&self) -> Self {
1421 attrs
: self.attrs
.clone(),
1422 qself
: self.qself
.clone(),
1423 path
: self.path
.clone(),
1427 #[cfg(feature = "full")]
1428 impl Clone
for PatRange
{
1429 fn clone(&self) -> Self {
1431 attrs
: self.attrs
.clone(),
1432 lo
: self.lo
.clone(),
1433 limits
: self.limits
.clone(),
1434 hi
: self.hi
.clone(),
1438 #[cfg(feature = "full")]
1439 impl Clone
for PatReference
{
1440 fn clone(&self) -> Self {
1442 attrs
: self.attrs
.clone(),
1443 and_token
: self.and_token
.clone(),
1444 mutability
: self.mutability
.clone(),
1445 pat
: self.pat
.clone(),
1449 #[cfg(feature = "full")]
1450 impl Clone
for PatRest
{
1451 fn clone(&self) -> Self {
1453 attrs
: self.attrs
.clone(),
1454 dot2_token
: self.dot2_token
.clone(),
1458 #[cfg(feature = "full")]
1459 impl Clone
for PatSlice
{
1460 fn clone(&self) -> Self {
1462 attrs
: self.attrs
.clone(),
1463 bracket_token
: self.bracket_token
.clone(),
1464 elems
: self.elems
.clone(),
1468 #[cfg(feature = "full")]
1469 impl Clone
for PatStruct
{
1470 fn clone(&self) -> Self {
1472 attrs
: self.attrs
.clone(),
1473 path
: self.path
.clone(),
1474 brace_token
: self.brace_token
.clone(),
1475 fields
: self.fields
.clone(),
1476 dot2_token
: self.dot2_token
.clone(),
1480 #[cfg(feature = "full")]
1481 impl Clone
for PatTuple
{
1482 fn clone(&self) -> Self {
1484 attrs
: self.attrs
.clone(),
1485 paren_token
: self.paren_token
.clone(),
1486 elems
: self.elems
.clone(),
1490 #[cfg(feature = "full")]
1491 impl Clone
for PatTupleStruct
{
1492 fn clone(&self) -> Self {
1494 attrs
: self.attrs
.clone(),
1495 path
: self.path
.clone(),
1496 pat
: self.pat
.clone(),
1500 #[cfg(feature = "full")]
1501 impl Clone
for PatType
{
1502 fn clone(&self) -> Self {
1504 attrs
: self.attrs
.clone(),
1505 pat
: self.pat
.clone(),
1506 colon_token
: self.colon_token
.clone(),
1507 ty
: self.ty
.clone(),
1511 #[cfg(feature = "full")]
1512 impl Clone
for PatWild
{
1513 fn clone(&self) -> Self {
1515 attrs
: self.attrs
.clone(),
1516 underscore_token
: self.underscore_token
.clone(),
1520 #[cfg(any(feature = "derive", feature = "full"))]
1521 impl Clone
for Path
{
1522 fn clone(&self) -> Self {
1524 leading_colon
: self.leading_colon
.clone(),
1525 segments
: self.segments
.clone(),
1529 #[cfg(any(feature = "derive", feature = "full"))]
1530 impl Clone
for PathArguments
{
1531 fn clone(&self) -> Self {
1533 PathArguments
::None
=> PathArguments
::None
,
1534 PathArguments
::AngleBracketed(v0
) => PathArguments
::AngleBracketed(v0
.clone()),
1535 PathArguments
::Parenthesized(v0
) => PathArguments
::Parenthesized(v0
.clone()),
1539 #[cfg(any(feature = "derive", feature = "full"))]
1540 impl Clone
for PathSegment
{
1541 fn clone(&self) -> Self {
1543 ident
: self.ident
.clone(),
1544 arguments
: self.arguments
.clone(),
1548 #[cfg(any(feature = "derive", feature = "full"))]
1549 impl Clone
for PredicateEq
{
1550 fn clone(&self) -> Self {
1552 lhs_ty
: self.lhs_ty
.clone(),
1553 eq_token
: self.eq_token
.clone(),
1554 rhs_ty
: self.rhs_ty
.clone(),
1558 #[cfg(any(feature = "derive", feature = "full"))]
1559 impl Clone
for PredicateLifetime
{
1560 fn clone(&self) -> Self {
1562 lifetime
: self.lifetime
.clone(),
1563 colon_token
: self.colon_token
.clone(),
1564 bounds
: self.bounds
.clone(),
1568 #[cfg(any(feature = "derive", feature = "full"))]
1569 impl Clone
for PredicateType
{
1570 fn clone(&self) -> Self {
1572 lifetimes
: self.lifetimes
.clone(),
1573 bounded_ty
: self.bounded_ty
.clone(),
1574 colon_token
: self.colon_token
.clone(),
1575 bounds
: self.bounds
.clone(),
1579 #[cfg(any(feature = "derive", feature = "full"))]
1580 impl Clone
for QSelf
{
1581 fn clone(&self) -> Self {
1583 lt_token
: self.lt_token
.clone(),
1584 ty
: self.ty
.clone(),
1585 position
: self.position
.clone(),
1586 as_token
: self.as_token
.clone(),
1587 gt_token
: self.gt_token
.clone(),
1591 #[cfg(feature = "full")]
1592 impl Copy
for RangeLimits {}
1593 #[cfg(feature = "full")]
1594 impl Clone
for RangeLimits
{
1595 fn clone(&self) -> Self {
1599 #[cfg(feature = "full")]
1600 impl Clone
for Receiver
{
1601 fn clone(&self) -> Self {
1603 attrs
: self.attrs
.clone(),
1604 reference
: self.reference
.clone(),
1605 mutability
: self.mutability
.clone(),
1606 self_token
: self.self_token
.clone(),
1610 #[cfg(any(feature = "derive", feature = "full"))]
1611 impl Clone
for ReturnType
{
1612 fn clone(&self) -> Self {
1614 ReturnType
::Default
=> ReturnType
::Default
,
1615 ReturnType
::Type(v0
, v1
) => ReturnType
::Type(v0
.clone(), v1
.clone()),
1619 #[cfg(feature = "full")]
1620 impl Clone
for Signature
{
1621 fn clone(&self) -> Self {
1623 constness
: self.constness
.clone(),
1624 asyncness
: self.asyncness
.clone(),
1625 unsafety
: self.unsafety
.clone(),
1626 abi
: self.abi
.clone(),
1627 fn_token
: self.fn_token
.clone(),
1628 ident
: self.ident
.clone(),
1629 generics
: self.generics
.clone(),
1630 paren_token
: self.paren_token
.clone(),
1631 inputs
: self.inputs
.clone(),
1632 variadic
: self.variadic
.clone(),
1633 output
: self.output
.clone(),
1637 #[cfg(feature = "full")]
1638 impl Clone
for Stmt
{
1639 fn clone(&self) -> Self {
1641 Stmt
::Local(v0
) => Stmt
::Local(v0
.clone()),
1642 Stmt
::Item(v0
) => Stmt
::Item(v0
.clone()),
1643 Stmt
::Expr(v0
) => Stmt
::Expr(v0
.clone()),
1644 Stmt
::Semi(v0
, v1
) => Stmt
::Semi(v0
.clone(), v1
.clone()),
1648 #[cfg(any(feature = "derive", feature = "full"))]
1649 impl Clone
for TraitBound
{
1650 fn clone(&self) -> Self {
1652 paren_token
: self.paren_token
.clone(),
1653 modifier
: self.modifier
.clone(),
1654 lifetimes
: self.lifetimes
.clone(),
1655 path
: self.path
.clone(),
1659 #[cfg(any(feature = "derive", feature = "full"))]
1660 impl Copy
for TraitBoundModifier {}
1661 #[cfg(any(feature = "derive", feature = "full"))]
1662 impl Clone
for TraitBoundModifier
{
1663 fn clone(&self) -> Self {
1667 #[cfg(feature = "full")]
1668 impl Clone
for TraitItem
{
1669 fn clone(&self) -> Self {
1671 TraitItem
::Const(v0
) => TraitItem
::Const(v0
.clone()),
1672 TraitItem
::Method(v0
) => TraitItem
::Method(v0
.clone()),
1673 TraitItem
::Type(v0
) => TraitItem
::Type(v0
.clone()),
1674 TraitItem
::Macro(v0
) => TraitItem
::Macro(v0
.clone()),
1675 TraitItem
::Verbatim(v0
) => TraitItem
::Verbatim(v0
.clone()),
1676 _
=> unreachable
!(),
1680 #[cfg(feature = "full")]
1681 impl Clone
for TraitItemConst
{
1682 fn clone(&self) -> Self {
1684 attrs
: self.attrs
.clone(),
1685 const_token
: self.const_token
.clone(),
1686 ident
: self.ident
.clone(),
1687 colon_token
: self.colon_token
.clone(),
1688 ty
: self.ty
.clone(),
1689 default: self.default.clone(),
1690 semi_token
: self.semi_token
.clone(),
1694 #[cfg(feature = "full")]
1695 impl Clone
for TraitItemMacro
{
1696 fn clone(&self) -> Self {
1698 attrs
: self.attrs
.clone(),
1699 mac
: self.mac
.clone(),
1700 semi_token
: self.semi_token
.clone(),
1704 #[cfg(feature = "full")]
1705 impl Clone
for TraitItemMethod
{
1706 fn clone(&self) -> Self {
1708 attrs
: self.attrs
.clone(),
1709 sig
: self.sig
.clone(),
1710 default: self.default.clone(),
1711 semi_token
: self.semi_token
.clone(),
1715 #[cfg(feature = "full")]
1716 impl Clone
for TraitItemType
{
1717 fn clone(&self) -> Self {
1719 attrs
: self.attrs
.clone(),
1720 type_token
: self.type_token
.clone(),
1721 ident
: self.ident
.clone(),
1722 generics
: self.generics
.clone(),
1723 colon_token
: self.colon_token
.clone(),
1724 bounds
: self.bounds
.clone(),
1725 default: self.default.clone(),
1726 semi_token
: self.semi_token
.clone(),
1730 #[cfg(any(feature = "derive", feature = "full"))]
1731 impl Clone
for Type
{
1732 fn clone(&self) -> Self {
1734 Type
::Array(v0
) => Type
::Array(v0
.clone()),
1735 Type
::BareFn(v0
) => Type
::BareFn(v0
.clone()),
1736 Type
::Group(v0
) => Type
::Group(v0
.clone()),
1737 Type
::ImplTrait(v0
) => Type
::ImplTrait(v0
.clone()),
1738 Type
::Infer(v0
) => Type
::Infer(v0
.clone()),
1739 Type
::Macro(v0
) => Type
::Macro(v0
.clone()),
1740 Type
::Never(v0
) => Type
::Never(v0
.clone()),
1741 Type
::Paren(v0
) => Type
::Paren(v0
.clone()),
1742 Type
::Path(v0
) => Type
::Path(v0
.clone()),
1743 Type
::Ptr(v0
) => Type
::Ptr(v0
.clone()),
1744 Type
::Reference(v0
) => Type
::Reference(v0
.clone()),
1745 Type
::Slice(v0
) => Type
::Slice(v0
.clone()),
1746 Type
::TraitObject(v0
) => Type
::TraitObject(v0
.clone()),
1747 Type
::Tuple(v0
) => Type
::Tuple(v0
.clone()),
1748 Type
::Verbatim(v0
) => Type
::Verbatim(v0
.clone()),
1749 _
=> unreachable
!(),
1753 #[cfg(any(feature = "derive", feature = "full"))]
1754 impl Clone
for TypeArray
{
1755 fn clone(&self) -> Self {
1757 bracket_token
: self.bracket_token
.clone(),
1758 elem
: self.elem
.clone(),
1759 semi_token
: self.semi_token
.clone(),
1760 len
: self.len
.clone(),
1764 #[cfg(any(feature = "derive", feature = "full"))]
1765 impl Clone
for TypeBareFn
{
1766 fn clone(&self) -> Self {
1768 lifetimes
: self.lifetimes
.clone(),
1769 unsafety
: self.unsafety
.clone(),
1770 abi
: self.abi
.clone(),
1771 fn_token
: self.fn_token
.clone(),
1772 paren_token
: self.paren_token
.clone(),
1773 inputs
: self.inputs
.clone(),
1774 variadic
: self.variadic
.clone(),
1775 output
: self.output
.clone(),
1779 #[cfg(any(feature = "derive", feature = "full"))]
1780 impl Clone
for TypeGroup
{
1781 fn clone(&self) -> Self {
1783 group_token
: self.group_token
.clone(),
1784 elem
: self.elem
.clone(),
1788 #[cfg(any(feature = "derive", feature = "full"))]
1789 impl Clone
for TypeImplTrait
{
1790 fn clone(&self) -> Self {
1792 impl_token
: self.impl_token
.clone(),
1793 bounds
: self.bounds
.clone(),
1797 #[cfg(any(feature = "derive", feature = "full"))]
1798 impl Clone
for TypeInfer
{
1799 fn clone(&self) -> Self {
1801 underscore_token
: self.underscore_token
.clone(),
1805 #[cfg(any(feature = "derive", feature = "full"))]
1806 impl Clone
for TypeMacro
{
1807 fn clone(&self) -> Self {
1809 mac
: self.mac
.clone(),
1813 #[cfg(any(feature = "derive", feature = "full"))]
1814 impl Clone
for TypeNever
{
1815 fn clone(&self) -> Self {
1817 bang_token
: self.bang_token
.clone(),
1821 #[cfg(any(feature = "derive", feature = "full"))]
1822 impl Clone
for TypeParam
{
1823 fn clone(&self) -> Self {
1825 attrs
: self.attrs
.clone(),
1826 ident
: self.ident
.clone(),
1827 colon_token
: self.colon_token
.clone(),
1828 bounds
: self.bounds
.clone(),
1829 eq_token
: self.eq_token
.clone(),
1830 default: self.default.clone(),
1834 #[cfg(any(feature = "derive", feature = "full"))]
1835 impl Clone
for TypeParamBound
{
1836 fn clone(&self) -> Self {
1838 TypeParamBound
::Trait(v0
) => TypeParamBound
::Trait(v0
.clone()),
1839 TypeParamBound
::Lifetime(v0
) => TypeParamBound
::Lifetime(v0
.clone()),
1843 #[cfg(any(feature = "derive", feature = "full"))]
1844 impl Clone
for TypeParen
{
1845 fn clone(&self) -> Self {
1847 paren_token
: self.paren_token
.clone(),
1848 elem
: self.elem
.clone(),
1852 #[cfg(any(feature = "derive", feature = "full"))]
1853 impl Clone
for TypePath
{
1854 fn clone(&self) -> Self {
1856 qself
: self.qself
.clone(),
1857 path
: self.path
.clone(),
1861 #[cfg(any(feature = "derive", feature = "full"))]
1862 impl Clone
for TypePtr
{
1863 fn clone(&self) -> Self {
1865 star_token
: self.star_token
.clone(),
1866 const_token
: self.const_token
.clone(),
1867 mutability
: self.mutability
.clone(),
1868 elem
: self.elem
.clone(),
1872 #[cfg(any(feature = "derive", feature = "full"))]
1873 impl Clone
for TypeReference
{
1874 fn clone(&self) -> Self {
1876 and_token
: self.and_token
.clone(),
1877 lifetime
: self.lifetime
.clone(),
1878 mutability
: self.mutability
.clone(),
1879 elem
: self.elem
.clone(),
1883 #[cfg(any(feature = "derive", feature = "full"))]
1884 impl Clone
for TypeSlice
{
1885 fn clone(&self) -> Self {
1887 bracket_token
: self.bracket_token
.clone(),
1888 elem
: self.elem
.clone(),
1892 #[cfg(any(feature = "derive", feature = "full"))]
1893 impl Clone
for TypeTraitObject
{
1894 fn clone(&self) -> Self {
1896 dyn_token
: self.dyn_token
.clone(),
1897 bounds
: self.bounds
.clone(),
1901 #[cfg(any(feature = "derive", feature = "full"))]
1902 impl Clone
for TypeTuple
{
1903 fn clone(&self) -> Self {
1905 paren_token
: self.paren_token
.clone(),
1906 elems
: self.elems
.clone(),
1910 #[cfg(any(feature = "derive", feature = "full"))]
1911 impl Copy
for UnOp {}
1912 #[cfg(any(feature = "derive", feature = "full"))]
1913 impl Clone
for UnOp
{
1914 fn clone(&self) -> Self {
1918 #[cfg(feature = "full")]
1919 impl Clone
for UseGlob
{
1920 fn clone(&self) -> Self {
1922 star_token
: self.star_token
.clone(),
1926 #[cfg(feature = "full")]
1927 impl Clone
for UseGroup
{
1928 fn clone(&self) -> Self {
1930 brace_token
: self.brace_token
.clone(),
1931 items
: self.items
.clone(),
1935 #[cfg(feature = "full")]
1936 impl Clone
for UseName
{
1937 fn clone(&self) -> Self {
1939 ident
: self.ident
.clone(),
1943 #[cfg(feature = "full")]
1944 impl Clone
for UsePath
{
1945 fn clone(&self) -> Self {
1947 ident
: self.ident
.clone(),
1948 colon2_token
: self.colon2_token
.clone(),
1949 tree
: self.tree
.clone(),
1953 #[cfg(feature = "full")]
1954 impl Clone
for UseRename
{
1955 fn clone(&self) -> Self {
1957 ident
: self.ident
.clone(),
1958 as_token
: self.as_token
.clone(),
1959 rename
: self.rename
.clone(),
1963 #[cfg(feature = "full")]
1964 impl Clone
for UseTree
{
1965 fn clone(&self) -> Self {
1967 UseTree
::Path(v0
) => UseTree
::Path(v0
.clone()),
1968 UseTree
::Name(v0
) => UseTree
::Name(v0
.clone()),
1969 UseTree
::Rename(v0
) => UseTree
::Rename(v0
.clone()),
1970 UseTree
::Glob(v0
) => UseTree
::Glob(v0
.clone()),
1971 UseTree
::Group(v0
) => UseTree
::Group(v0
.clone()),
1975 #[cfg(any(feature = "derive", feature = "full"))]
1976 impl Clone
for Variadic
{
1977 fn clone(&self) -> Self {
1979 attrs
: self.attrs
.clone(),
1980 dots
: self.dots
.clone(),
1984 #[cfg(any(feature = "derive", feature = "full"))]
1985 impl Clone
for Variant
{
1986 fn clone(&self) -> Self {
1988 attrs
: self.attrs
.clone(),
1989 ident
: self.ident
.clone(),
1990 fields
: self.fields
.clone(),
1991 discriminant
: self.discriminant
.clone(),
1995 #[cfg(any(feature = "derive", feature = "full"))]
1996 impl Clone
for VisCrate
{
1997 fn clone(&self) -> Self {
1999 crate_token
: self.crate_token
.clone(),
2003 #[cfg(any(feature = "derive", feature = "full"))]
2004 impl Clone
for VisPublic
{
2005 fn clone(&self) -> Self {
2007 pub_token
: self.pub_token
.clone(),
2011 #[cfg(any(feature = "derive", feature = "full"))]
2012 impl Clone
for VisRestricted
{
2013 fn clone(&self) -> Self {
2015 pub_token
: self.pub_token
.clone(),
2016 paren_token
: self.paren_token
.clone(),
2017 in_token
: self.in_token
.clone(),
2018 path
: self.path
.clone(),
2022 #[cfg(any(feature = "derive", feature = "full"))]
2023 impl Clone
for Visibility
{
2024 fn clone(&self) -> Self {
2026 Visibility
::Public(v0
) => Visibility
::Public(v0
.clone()),
2027 Visibility
::Crate(v0
) => Visibility
::Crate(v0
.clone()),
2028 Visibility
::Restricted(v0
) => Visibility
::Restricted(v0
.clone()),
2029 Visibility
::Inherited
=> Visibility
::Inherited
,
2033 #[cfg(any(feature = "derive", feature = "full"))]
2034 impl Clone
for WhereClause
{
2035 fn clone(&self) -> Self {
2037 where_token
: self.where_token
.clone(),
2038 predicates
: self.predicates
.clone(),
2042 #[cfg(any(feature = "derive", feature = "full"))]
2043 impl Clone
for WherePredicate
{
2044 fn clone(&self) -> Self {
2046 WherePredicate
::Type(v0
) => WherePredicate
::Type(v0
.clone()),
2047 WherePredicate
::Lifetime(v0
) => WherePredicate
::Lifetime(v0
.clone()),
2048 WherePredicate
::Eq(v0
) => WherePredicate
::Eq(v0
.clone()),