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