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