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