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