1 // This file is @generated by syn-internal-codegen. 2 // It is not intended for manual editing. 3 4 #[cfg(any(feature = "derive", feature = "full"))] 5 use crate::tt::TokenStreamHelper; 6 use crate::*; 7 #[cfg(any(feature = "derive", feature = "full"))] 8 impl Eq for Abi {} 9 #[cfg(any(feature = "derive", feature = "full"))] 10 impl PartialEq for Abi { eq(&self, other: &Self) -> bool11 fn eq(&self, other: &Self) -> bool { 12 self.name == other.name 13 } 14 } 15 #[cfg(any(feature = "derive", feature = "full"))] 16 impl Eq for AngleBracketedGenericArguments {} 17 #[cfg(any(feature = "derive", feature = "full"))] 18 impl PartialEq for AngleBracketedGenericArguments { eq(&self, other: &Self) -> bool19 fn eq(&self, other: &Self) -> bool { 20 self.colon2_token == other.colon2_token && self.args == other.args 21 } 22 } 23 #[cfg(feature = "full")] 24 impl Eq for Arm {} 25 #[cfg(feature = "full")] 26 impl PartialEq for Arm { eq(&self, other: &Self) -> bool27 fn eq(&self, other: &Self) -> bool { 28 self.attrs == other.attrs 29 && self.pat == other.pat 30 && self.guard == other.guard 31 && self.body == other.body 32 && self.comma == other.comma 33 } 34 } 35 #[cfg(any(feature = "derive", feature = "full"))] 36 impl Eq for AttrStyle {} 37 #[cfg(any(feature = "derive", feature = "full"))] 38 impl PartialEq for AttrStyle { eq(&self, other: &Self) -> bool39 fn eq(&self, other: &Self) -> bool { 40 match (self, other) { 41 (AttrStyle::Outer, AttrStyle::Outer) => true, 42 (AttrStyle::Inner(_), AttrStyle::Inner(_)) => true, 43 _ => false, 44 } 45 } 46 } 47 #[cfg(any(feature = "derive", feature = "full"))] 48 impl Eq for Attribute {} 49 #[cfg(any(feature = "derive", feature = "full"))] 50 impl PartialEq for Attribute { eq(&self, other: &Self) -> bool51 fn eq(&self, other: &Self) -> bool { 52 self.style == other.style 53 && self.path == other.path 54 && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens) 55 } 56 } 57 #[cfg(any(feature = "derive", feature = "full"))] 58 impl Eq for BareFnArg {} 59 #[cfg(any(feature = "derive", feature = "full"))] 60 impl PartialEq for BareFnArg { eq(&self, other: &Self) -> bool61 fn eq(&self, other: &Self) -> bool { 62 self.attrs == other.attrs && self.name == other.name && self.ty == other.ty 63 } 64 } 65 #[cfg(any(feature = "derive", feature = "full"))] 66 impl Eq for BinOp {} 67 #[cfg(any(feature = "derive", feature = "full"))] 68 impl PartialEq for BinOp { eq(&self, other: &Self) -> bool69 fn eq(&self, other: &Self) -> bool { 70 match (self, other) { 71 (BinOp::Add(_), BinOp::Add(_)) => true, 72 (BinOp::Sub(_), BinOp::Sub(_)) => true, 73 (BinOp::Mul(_), BinOp::Mul(_)) => true, 74 (BinOp::Div(_), BinOp::Div(_)) => true, 75 (BinOp::Rem(_), BinOp::Rem(_)) => true, 76 (BinOp::And(_), BinOp::And(_)) => true, 77 (BinOp::Or(_), BinOp::Or(_)) => true, 78 (BinOp::BitXor(_), BinOp::BitXor(_)) => true, 79 (BinOp::BitAnd(_), BinOp::BitAnd(_)) => true, 80 (BinOp::BitOr(_), BinOp::BitOr(_)) => true, 81 (BinOp::Shl(_), BinOp::Shl(_)) => true, 82 (BinOp::Shr(_), BinOp::Shr(_)) => true, 83 (BinOp::Eq(_), BinOp::Eq(_)) => true, 84 (BinOp::Lt(_), BinOp::Lt(_)) => true, 85 (BinOp::Le(_), BinOp::Le(_)) => true, 86 (BinOp::Ne(_), BinOp::Ne(_)) => true, 87 (BinOp::Ge(_), BinOp::Ge(_)) => true, 88 (BinOp::Gt(_), BinOp::Gt(_)) => true, 89 (BinOp::AddEq(_), BinOp::AddEq(_)) => true, 90 (BinOp::SubEq(_), BinOp::SubEq(_)) => true, 91 (BinOp::MulEq(_), BinOp::MulEq(_)) => true, 92 (BinOp::DivEq(_), BinOp::DivEq(_)) => true, 93 (BinOp::RemEq(_), BinOp::RemEq(_)) => true, 94 (BinOp::BitXorEq(_), BinOp::BitXorEq(_)) => true, 95 (BinOp::BitAndEq(_), BinOp::BitAndEq(_)) => true, 96 (BinOp::BitOrEq(_), BinOp::BitOrEq(_)) => true, 97 (BinOp::ShlEq(_), BinOp::ShlEq(_)) => true, 98 (BinOp::ShrEq(_), BinOp::ShrEq(_)) => true, 99 _ => false, 100 } 101 } 102 } 103 #[cfg(any(feature = "derive", feature = "full"))] 104 impl Eq for Binding {} 105 #[cfg(any(feature = "derive", feature = "full"))] 106 impl PartialEq for Binding { eq(&self, other: &Self) -> bool107 fn eq(&self, other: &Self) -> bool { 108 self.ident == other.ident && self.ty == other.ty 109 } 110 } 111 #[cfg(feature = "full")] 112 impl Eq for Block {} 113 #[cfg(feature = "full")] 114 impl PartialEq for Block { eq(&self, other: &Self) -> bool115 fn eq(&self, other: &Self) -> bool { 116 self.stmts == other.stmts 117 } 118 } 119 #[cfg(any(feature = "derive", feature = "full"))] 120 impl Eq for BoundLifetimes {} 121 #[cfg(any(feature = "derive", feature = "full"))] 122 impl PartialEq for BoundLifetimes { eq(&self, other: &Self) -> bool123 fn eq(&self, other: &Self) -> bool { 124 self.lifetimes == other.lifetimes 125 } 126 } 127 #[cfg(any(feature = "derive", feature = "full"))] 128 impl Eq for ConstParam {} 129 #[cfg(any(feature = "derive", feature = "full"))] 130 impl PartialEq for ConstParam { eq(&self, other: &Self) -> bool131 fn eq(&self, other: &Self) -> bool { 132 self.attrs == other.attrs 133 && self.ident == other.ident 134 && self.ty == other.ty 135 && self.eq_token == other.eq_token 136 && self.default == other.default 137 } 138 } 139 #[cfg(any(feature = "derive", feature = "full"))] 140 impl Eq for Constraint {} 141 #[cfg(any(feature = "derive", feature = "full"))] 142 impl PartialEq for Constraint { eq(&self, other: &Self) -> bool143 fn eq(&self, other: &Self) -> bool { 144 self.ident == other.ident && self.bounds == other.bounds 145 } 146 } 147 #[cfg(feature = "derive")] 148 impl Eq for Data {} 149 #[cfg(feature = "derive")] 150 impl PartialEq for Data { eq(&self, other: &Self) -> bool151 fn eq(&self, other: &Self) -> bool { 152 match (self, other) { 153 (Data::Struct(self0), Data::Struct(other0)) => self0 == other0, 154 (Data::Enum(self0), Data::Enum(other0)) => self0 == other0, 155 (Data::Union(self0), Data::Union(other0)) => self0 == other0, 156 _ => false, 157 } 158 } 159 } 160 #[cfg(feature = "derive")] 161 impl Eq for DataEnum {} 162 #[cfg(feature = "derive")] 163 impl PartialEq for DataEnum { eq(&self, other: &Self) -> bool164 fn eq(&self, other: &Self) -> bool { 165 self.variants == other.variants 166 } 167 } 168 #[cfg(feature = "derive")] 169 impl Eq for DataStruct {} 170 #[cfg(feature = "derive")] 171 impl PartialEq for DataStruct { eq(&self, other: &Self) -> bool172 fn eq(&self, other: &Self) -> bool { 173 self.fields == other.fields && self.semi_token == other.semi_token 174 } 175 } 176 #[cfg(feature = "derive")] 177 impl Eq for DataUnion {} 178 #[cfg(feature = "derive")] 179 impl PartialEq for DataUnion { eq(&self, other: &Self) -> bool180 fn eq(&self, other: &Self) -> bool { 181 self.fields == other.fields 182 } 183 } 184 #[cfg(feature = "derive")] 185 impl Eq for DeriveInput {} 186 #[cfg(feature = "derive")] 187 impl PartialEq for DeriveInput { eq(&self, other: &Self) -> bool188 fn eq(&self, other: &Self) -> bool { 189 self.attrs == other.attrs 190 && self.vis == other.vis 191 && self.ident == other.ident 192 && self.generics == other.generics 193 && self.data == other.data 194 } 195 } 196 #[cfg(any(feature = "derive", feature = "full"))] 197 impl Eq for Expr {} 198 #[cfg(any(feature = "derive", feature = "full"))] 199 impl PartialEq for Expr { eq(&self, other: &Self) -> bool200 fn eq(&self, other: &Self) -> bool { 201 match (self, other) { 202 #[cfg(feature = "full")] 203 (Expr::Array(self0), Expr::Array(other0)) => self0 == other0, 204 #[cfg(feature = "full")] 205 (Expr::Assign(self0), Expr::Assign(other0)) => self0 == other0, 206 #[cfg(feature = "full")] 207 (Expr::AssignOp(self0), Expr::AssignOp(other0)) => self0 == other0, 208 #[cfg(feature = "full")] 209 (Expr::Async(self0), Expr::Async(other0)) => self0 == other0, 210 #[cfg(feature = "full")] 211 (Expr::Await(self0), Expr::Await(other0)) => self0 == other0, 212 (Expr::Binary(self0), Expr::Binary(other0)) => self0 == other0, 213 #[cfg(feature = "full")] 214 (Expr::Block(self0), Expr::Block(other0)) => self0 == other0, 215 #[cfg(feature = "full")] 216 (Expr::Box(self0), Expr::Box(other0)) => self0 == other0, 217 #[cfg(feature = "full")] 218 (Expr::Break(self0), Expr::Break(other0)) => self0 == other0, 219 (Expr::Call(self0), Expr::Call(other0)) => self0 == other0, 220 (Expr::Cast(self0), Expr::Cast(other0)) => self0 == other0, 221 #[cfg(feature = "full")] 222 (Expr::Closure(self0), Expr::Closure(other0)) => self0 == other0, 223 #[cfg(feature = "full")] 224 (Expr::Continue(self0), Expr::Continue(other0)) => self0 == other0, 225 (Expr::Field(self0), Expr::Field(other0)) => self0 == other0, 226 #[cfg(feature = "full")] 227 (Expr::ForLoop(self0), Expr::ForLoop(other0)) => self0 == other0, 228 #[cfg(feature = "full")] 229 (Expr::Group(self0), Expr::Group(other0)) => self0 == other0, 230 #[cfg(feature = "full")] 231 (Expr::If(self0), Expr::If(other0)) => self0 == other0, 232 (Expr::Index(self0), Expr::Index(other0)) => self0 == other0, 233 #[cfg(feature = "full")] 234 (Expr::Let(self0), Expr::Let(other0)) => self0 == other0, 235 (Expr::Lit(self0), Expr::Lit(other0)) => self0 == other0, 236 #[cfg(feature = "full")] 237 (Expr::Loop(self0), Expr::Loop(other0)) => self0 == other0, 238 #[cfg(feature = "full")] 239 (Expr::Macro(self0), Expr::Macro(other0)) => self0 == other0, 240 #[cfg(feature = "full")] 241 (Expr::Match(self0), Expr::Match(other0)) => self0 == other0, 242 #[cfg(feature = "full")] 243 (Expr::MethodCall(self0), Expr::MethodCall(other0)) => self0 == other0, 244 (Expr::Paren(self0), Expr::Paren(other0)) => self0 == other0, 245 (Expr::Path(self0), Expr::Path(other0)) => self0 == other0, 246 #[cfg(feature = "full")] 247 (Expr::Range(self0), Expr::Range(other0)) => self0 == other0, 248 #[cfg(feature = "full")] 249 (Expr::Reference(self0), Expr::Reference(other0)) => self0 == other0, 250 #[cfg(feature = "full")] 251 (Expr::Repeat(self0), Expr::Repeat(other0)) => self0 == other0, 252 #[cfg(feature = "full")] 253 (Expr::Return(self0), Expr::Return(other0)) => self0 == other0, 254 #[cfg(feature = "full")] 255 (Expr::Struct(self0), Expr::Struct(other0)) => self0 == other0, 256 #[cfg(feature = "full")] 257 (Expr::Try(self0), Expr::Try(other0)) => self0 == other0, 258 #[cfg(feature = "full")] 259 (Expr::TryBlock(self0), Expr::TryBlock(other0)) => self0 == other0, 260 #[cfg(feature = "full")] 261 (Expr::Tuple(self0), Expr::Tuple(other0)) => self0 == other0, 262 #[cfg(feature = "full")] 263 (Expr::Type(self0), Expr::Type(other0)) => self0 == other0, 264 (Expr::Unary(self0), Expr::Unary(other0)) => self0 == other0, 265 #[cfg(feature = "full")] 266 (Expr::Unsafe(self0), Expr::Unsafe(other0)) => self0 == other0, 267 (Expr::Verbatim(self0), Expr::Verbatim(other0)) => { 268 TokenStreamHelper(self0) == TokenStreamHelper(other0) 269 } 270 #[cfg(feature = "full")] 271 (Expr::While(self0), Expr::While(other0)) => self0 == other0, 272 #[cfg(feature = "full")] 273 (Expr::Yield(self0), Expr::Yield(other0)) => self0 == other0, 274 _ => false, 275 } 276 } 277 } 278 #[cfg(feature = "full")] 279 impl Eq for ExprArray {} 280 #[cfg(feature = "full")] 281 impl PartialEq for ExprArray { eq(&self, other: &Self) -> bool282 fn eq(&self, other: &Self) -> bool { 283 self.attrs == other.attrs && self.elems == other.elems 284 } 285 } 286 #[cfg(feature = "full")] 287 impl Eq for ExprAssign {} 288 #[cfg(feature = "full")] 289 impl PartialEq for ExprAssign { eq(&self, other: &Self) -> bool290 fn eq(&self, other: &Self) -> bool { 291 self.attrs == other.attrs && self.left == other.left && self.right == other.right 292 } 293 } 294 #[cfg(feature = "full")] 295 impl Eq for ExprAssignOp {} 296 #[cfg(feature = "full")] 297 impl PartialEq for ExprAssignOp { eq(&self, other: &Self) -> bool298 fn eq(&self, other: &Self) -> bool { 299 self.attrs == other.attrs 300 && self.left == other.left 301 && self.op == other.op 302 && self.right == other.right 303 } 304 } 305 #[cfg(feature = "full")] 306 impl Eq for ExprAsync {} 307 #[cfg(feature = "full")] 308 impl PartialEq for ExprAsync { eq(&self, other: &Self) -> bool309 fn eq(&self, other: &Self) -> bool { 310 self.attrs == other.attrs && self.capture == other.capture && self.block == other.block 311 } 312 } 313 #[cfg(feature = "full")] 314 impl Eq for ExprAwait {} 315 #[cfg(feature = "full")] 316 impl PartialEq for ExprAwait { eq(&self, other: &Self) -> bool317 fn eq(&self, other: &Self) -> bool { 318 self.attrs == other.attrs && self.base == other.base 319 } 320 } 321 #[cfg(any(feature = "derive", feature = "full"))] 322 impl Eq for ExprBinary {} 323 #[cfg(any(feature = "derive", feature = "full"))] 324 impl PartialEq for ExprBinary { eq(&self, other: &Self) -> bool325 fn eq(&self, other: &Self) -> bool { 326 self.attrs == other.attrs 327 && self.left == other.left 328 && self.op == other.op 329 && self.right == other.right 330 } 331 } 332 #[cfg(feature = "full")] 333 impl Eq for ExprBlock {} 334 #[cfg(feature = "full")] 335 impl PartialEq for ExprBlock { eq(&self, other: &Self) -> bool336 fn eq(&self, other: &Self) -> bool { 337 self.attrs == other.attrs && self.label == other.label && self.block == other.block 338 } 339 } 340 #[cfg(feature = "full")] 341 impl Eq for ExprBox {} 342 #[cfg(feature = "full")] 343 impl PartialEq for ExprBox { eq(&self, other: &Self) -> bool344 fn eq(&self, other: &Self) -> bool { 345 self.attrs == other.attrs && self.expr == other.expr 346 } 347 } 348 #[cfg(feature = "full")] 349 impl Eq for ExprBreak {} 350 #[cfg(feature = "full")] 351 impl PartialEq for ExprBreak { eq(&self, other: &Self) -> bool352 fn eq(&self, other: &Self) -> bool { 353 self.attrs == other.attrs && self.label == other.label && self.expr == other.expr 354 } 355 } 356 #[cfg(any(feature = "derive", feature = "full"))] 357 impl Eq for ExprCall {} 358 #[cfg(any(feature = "derive", feature = "full"))] 359 impl PartialEq for ExprCall { eq(&self, other: &Self) -> bool360 fn eq(&self, other: &Self) -> bool { 361 self.attrs == other.attrs && self.func == other.func && self.args == other.args 362 } 363 } 364 #[cfg(any(feature = "derive", feature = "full"))] 365 impl Eq for ExprCast {} 366 #[cfg(any(feature = "derive", feature = "full"))] 367 impl PartialEq for ExprCast { eq(&self, other: &Self) -> bool368 fn eq(&self, other: &Self) -> bool { 369 self.attrs == other.attrs && self.expr == other.expr && self.ty == other.ty 370 } 371 } 372 #[cfg(feature = "full")] 373 impl Eq for ExprClosure {} 374 #[cfg(feature = "full")] 375 impl PartialEq for ExprClosure { eq(&self, other: &Self) -> bool376 fn eq(&self, other: &Self) -> bool { 377 self.attrs == other.attrs 378 && self.asyncness == other.asyncness 379 && self.movability == other.movability 380 && self.capture == other.capture 381 && self.inputs == other.inputs 382 && self.output == other.output 383 && self.body == other.body 384 } 385 } 386 #[cfg(feature = "full")] 387 impl Eq for ExprContinue {} 388 #[cfg(feature = "full")] 389 impl PartialEq for ExprContinue { eq(&self, other: &Self) -> bool390 fn eq(&self, other: &Self) -> bool { 391 self.attrs == other.attrs && self.label == other.label 392 } 393 } 394 #[cfg(any(feature = "derive", feature = "full"))] 395 impl Eq for ExprField {} 396 #[cfg(any(feature = "derive", feature = "full"))] 397 impl PartialEq for ExprField { eq(&self, other: &Self) -> bool398 fn eq(&self, other: &Self) -> bool { 399 self.attrs == other.attrs && self.base == other.base && self.member == other.member 400 } 401 } 402 #[cfg(feature = "full")] 403 impl Eq for ExprForLoop {} 404 #[cfg(feature = "full")] 405 impl PartialEq for ExprForLoop { eq(&self, other: &Self) -> bool406 fn eq(&self, other: &Self) -> bool { 407 self.attrs == other.attrs 408 && self.label == other.label 409 && self.pat == other.pat 410 && self.expr == other.expr 411 && self.body == other.body 412 } 413 } 414 #[cfg(feature = "full")] 415 impl Eq for ExprGroup {} 416 #[cfg(feature = "full")] 417 impl PartialEq for ExprGroup { eq(&self, other: &Self) -> bool418 fn eq(&self, other: &Self) -> bool { 419 self.attrs == other.attrs && self.expr == other.expr 420 } 421 } 422 #[cfg(feature = "full")] 423 impl Eq for ExprIf {} 424 #[cfg(feature = "full")] 425 impl PartialEq for ExprIf { eq(&self, other: &Self) -> bool426 fn eq(&self, other: &Self) -> bool { 427 self.attrs == other.attrs 428 && self.cond == other.cond 429 && self.then_branch == other.then_branch 430 && self.else_branch == other.else_branch 431 } 432 } 433 #[cfg(any(feature = "derive", feature = "full"))] 434 impl Eq for ExprIndex {} 435 #[cfg(any(feature = "derive", feature = "full"))] 436 impl PartialEq for ExprIndex { eq(&self, other: &Self) -> bool437 fn eq(&self, other: &Self) -> bool { 438 self.attrs == other.attrs && self.expr == other.expr && self.index == other.index 439 } 440 } 441 #[cfg(feature = "full")] 442 impl Eq for ExprLet {} 443 #[cfg(feature = "full")] 444 impl PartialEq for ExprLet { eq(&self, other: &Self) -> bool445 fn eq(&self, other: &Self) -> bool { 446 self.attrs == other.attrs && self.pat == other.pat && self.expr == other.expr 447 } 448 } 449 #[cfg(any(feature = "derive", feature = "full"))] 450 impl Eq for ExprLit {} 451 #[cfg(any(feature = "derive", feature = "full"))] 452 impl PartialEq for ExprLit { eq(&self, other: &Self) -> bool453 fn eq(&self, other: &Self) -> bool { 454 self.attrs == other.attrs && self.lit == other.lit 455 } 456 } 457 #[cfg(feature = "full")] 458 impl Eq for ExprLoop {} 459 #[cfg(feature = "full")] 460 impl PartialEq for ExprLoop { eq(&self, other: &Self) -> bool461 fn eq(&self, other: &Self) -> bool { 462 self.attrs == other.attrs && self.label == other.label && self.body == other.body 463 } 464 } 465 #[cfg(feature = "full")] 466 impl Eq for ExprMacro {} 467 #[cfg(feature = "full")] 468 impl PartialEq for ExprMacro { eq(&self, other: &Self) -> bool469 fn eq(&self, other: &Self) -> bool { 470 self.attrs == other.attrs && self.mac == other.mac 471 } 472 } 473 #[cfg(feature = "full")] 474 impl Eq for ExprMatch {} 475 #[cfg(feature = "full")] 476 impl PartialEq for ExprMatch { eq(&self, other: &Self) -> bool477 fn eq(&self, other: &Self) -> bool { 478 self.attrs == other.attrs && self.expr == other.expr && self.arms == other.arms 479 } 480 } 481 #[cfg(feature = "full")] 482 impl Eq for ExprMethodCall {} 483 #[cfg(feature = "full")] 484 impl PartialEq for ExprMethodCall { eq(&self, other: &Self) -> bool485 fn eq(&self, other: &Self) -> bool { 486 self.attrs == other.attrs 487 && self.receiver == other.receiver 488 && self.method == other.method 489 && self.turbofish == other.turbofish 490 && self.args == other.args 491 } 492 } 493 #[cfg(any(feature = "derive", feature = "full"))] 494 impl Eq for ExprParen {} 495 #[cfg(any(feature = "derive", feature = "full"))] 496 impl PartialEq for ExprParen { eq(&self, other: &Self) -> bool497 fn eq(&self, other: &Self) -> bool { 498 self.attrs == other.attrs && self.expr == other.expr 499 } 500 } 501 #[cfg(any(feature = "derive", feature = "full"))] 502 impl Eq for ExprPath {} 503 #[cfg(any(feature = "derive", feature = "full"))] 504 impl PartialEq for ExprPath { eq(&self, other: &Self) -> bool505 fn eq(&self, other: &Self) -> bool { 506 self.attrs == other.attrs && self.qself == other.qself && self.path == other.path 507 } 508 } 509 #[cfg(feature = "full")] 510 impl Eq for ExprRange {} 511 #[cfg(feature = "full")] 512 impl PartialEq for ExprRange { eq(&self, other: &Self) -> bool513 fn eq(&self, other: &Self) -> bool { 514 self.attrs == other.attrs 515 && self.from == other.from 516 && self.limits == other.limits 517 && self.to == other.to 518 } 519 } 520 #[cfg(feature = "full")] 521 impl Eq for ExprReference {} 522 #[cfg(feature = "full")] 523 impl PartialEq for ExprReference { eq(&self, other: &Self) -> bool524 fn eq(&self, other: &Self) -> bool { 525 self.attrs == other.attrs && self.mutability == other.mutability && self.expr == other.expr 526 } 527 } 528 #[cfg(feature = "full")] 529 impl Eq for ExprRepeat {} 530 #[cfg(feature = "full")] 531 impl PartialEq for ExprRepeat { eq(&self, other: &Self) -> bool532 fn eq(&self, other: &Self) -> bool { 533 self.attrs == other.attrs && self.expr == other.expr && self.len == other.len 534 } 535 } 536 #[cfg(feature = "full")] 537 impl Eq for ExprReturn {} 538 #[cfg(feature = "full")] 539 impl PartialEq for ExprReturn { eq(&self, other: &Self) -> bool540 fn eq(&self, other: &Self) -> bool { 541 self.attrs == other.attrs && self.expr == other.expr 542 } 543 } 544 #[cfg(feature = "full")] 545 impl Eq for ExprStruct {} 546 #[cfg(feature = "full")] 547 impl PartialEq for ExprStruct { eq(&self, other: &Self) -> bool548 fn eq(&self, other: &Self) -> bool { 549 self.attrs == other.attrs 550 && self.path == other.path 551 && self.fields == other.fields 552 && self.dot2_token == other.dot2_token 553 && self.rest == other.rest 554 } 555 } 556 #[cfg(feature = "full")] 557 impl Eq for ExprTry {} 558 #[cfg(feature = "full")] 559 impl PartialEq for ExprTry { eq(&self, other: &Self) -> bool560 fn eq(&self, other: &Self) -> bool { 561 self.attrs == other.attrs && self.expr == other.expr 562 } 563 } 564 #[cfg(feature = "full")] 565 impl Eq for ExprTryBlock {} 566 #[cfg(feature = "full")] 567 impl PartialEq for ExprTryBlock { eq(&self, other: &Self) -> bool568 fn eq(&self, other: &Self) -> bool { 569 self.attrs == other.attrs && self.block == other.block 570 } 571 } 572 #[cfg(feature = "full")] 573 impl Eq for ExprTuple {} 574 #[cfg(feature = "full")] 575 impl PartialEq for ExprTuple { eq(&self, other: &Self) -> bool576 fn eq(&self, other: &Self) -> bool { 577 self.attrs == other.attrs && self.elems == other.elems 578 } 579 } 580 #[cfg(feature = "full")] 581 impl Eq for ExprType {} 582 #[cfg(feature = "full")] 583 impl PartialEq for ExprType { eq(&self, other: &Self) -> bool584 fn eq(&self, other: &Self) -> bool { 585 self.attrs == other.attrs && self.expr == other.expr && self.ty == other.ty 586 } 587 } 588 #[cfg(any(feature = "derive", feature = "full"))] 589 impl Eq for ExprUnary {} 590 #[cfg(any(feature = "derive", feature = "full"))] 591 impl PartialEq for ExprUnary { eq(&self, other: &Self) -> bool592 fn eq(&self, other: &Self) -> bool { 593 self.attrs == other.attrs && self.op == other.op && self.expr == other.expr 594 } 595 } 596 #[cfg(feature = "full")] 597 impl Eq for ExprUnsafe {} 598 #[cfg(feature = "full")] 599 impl PartialEq for ExprUnsafe { eq(&self, other: &Self) -> bool600 fn eq(&self, other: &Self) -> bool { 601 self.attrs == other.attrs && self.block == other.block 602 } 603 } 604 #[cfg(feature = "full")] 605 impl Eq for ExprWhile {} 606 #[cfg(feature = "full")] 607 impl PartialEq for ExprWhile { eq(&self, other: &Self) -> bool608 fn eq(&self, other: &Self) -> bool { 609 self.attrs == other.attrs 610 && self.label == other.label 611 && self.cond == other.cond 612 && self.body == other.body 613 } 614 } 615 #[cfg(feature = "full")] 616 impl Eq for ExprYield {} 617 #[cfg(feature = "full")] 618 impl PartialEq for ExprYield { eq(&self, other: &Self) -> bool619 fn eq(&self, other: &Self) -> bool { 620 self.attrs == other.attrs && self.expr == other.expr 621 } 622 } 623 #[cfg(any(feature = "derive", feature = "full"))] 624 impl Eq for Field {} 625 #[cfg(any(feature = "derive", feature = "full"))] 626 impl PartialEq for Field { eq(&self, other: &Self) -> bool627 fn eq(&self, other: &Self) -> bool { 628 self.attrs == other.attrs 629 && self.vis == other.vis 630 && self.ident == other.ident 631 && self.colon_token == other.colon_token 632 && self.ty == other.ty 633 } 634 } 635 #[cfg(feature = "full")] 636 impl Eq for FieldPat {} 637 #[cfg(feature = "full")] 638 impl PartialEq for FieldPat { eq(&self, other: &Self) -> bool639 fn eq(&self, other: &Self) -> bool { 640 self.attrs == other.attrs 641 && self.member == other.member 642 && self.colon_token == other.colon_token 643 && self.pat == other.pat 644 } 645 } 646 #[cfg(feature = "full")] 647 impl Eq for FieldValue {} 648 #[cfg(feature = "full")] 649 impl PartialEq for FieldValue { eq(&self, other: &Self) -> bool650 fn eq(&self, other: &Self) -> bool { 651 self.attrs == other.attrs 652 && self.member == other.member 653 && self.colon_token == other.colon_token 654 && self.expr == other.expr 655 } 656 } 657 #[cfg(any(feature = "derive", feature = "full"))] 658 impl Eq for Fields {} 659 #[cfg(any(feature = "derive", feature = "full"))] 660 impl PartialEq for Fields { eq(&self, other: &Self) -> bool661 fn eq(&self, other: &Self) -> bool { 662 match (self, other) { 663 (Fields::Named(self0), Fields::Named(other0)) => self0 == other0, 664 (Fields::Unnamed(self0), Fields::Unnamed(other0)) => self0 == other0, 665 (Fields::Unit, Fields::Unit) => true, 666 _ => false, 667 } 668 } 669 } 670 #[cfg(any(feature = "derive", feature = "full"))] 671 impl Eq for FieldsNamed {} 672 #[cfg(any(feature = "derive", feature = "full"))] 673 impl PartialEq for FieldsNamed { eq(&self, other: &Self) -> bool674 fn eq(&self, other: &Self) -> bool { 675 self.named == other.named 676 } 677 } 678 #[cfg(any(feature = "derive", feature = "full"))] 679 impl Eq for FieldsUnnamed {} 680 #[cfg(any(feature = "derive", feature = "full"))] 681 impl PartialEq for FieldsUnnamed { eq(&self, other: &Self) -> bool682 fn eq(&self, other: &Self) -> bool { 683 self.unnamed == other.unnamed 684 } 685 } 686 #[cfg(feature = "full")] 687 impl Eq for File {} 688 #[cfg(feature = "full")] 689 impl PartialEq for File { eq(&self, other: &Self) -> bool690 fn eq(&self, other: &Self) -> bool { 691 self.shebang == other.shebang && self.attrs == other.attrs && self.items == other.items 692 } 693 } 694 #[cfg(feature = "full")] 695 impl Eq for FnArg {} 696 #[cfg(feature = "full")] 697 impl PartialEq for FnArg { eq(&self, other: &Self) -> bool698 fn eq(&self, other: &Self) -> bool { 699 match (self, other) { 700 (FnArg::Receiver(self0), FnArg::Receiver(other0)) => self0 == other0, 701 (FnArg::Typed(self0), FnArg::Typed(other0)) => self0 == other0, 702 _ => false, 703 } 704 } 705 } 706 #[cfg(feature = "full")] 707 impl Eq for ForeignItem {} 708 #[cfg(feature = "full")] 709 impl PartialEq for ForeignItem { eq(&self, other: &Self) -> bool710 fn eq(&self, other: &Self) -> bool { 711 match (self, other) { 712 (ForeignItem::Fn(self0), ForeignItem::Fn(other0)) => self0 == other0, 713 (ForeignItem::Static(self0), ForeignItem::Static(other0)) => self0 == other0, 714 (ForeignItem::Type(self0), ForeignItem::Type(other0)) => self0 == other0, 715 (ForeignItem::Macro(self0), ForeignItem::Macro(other0)) => self0 == other0, 716 (ForeignItem::Verbatim(self0), ForeignItem::Verbatim(other0)) => { 717 TokenStreamHelper(self0) == TokenStreamHelper(other0) 718 } 719 _ => false, 720 } 721 } 722 } 723 #[cfg(feature = "full")] 724 impl Eq for ForeignItemFn {} 725 #[cfg(feature = "full")] 726 impl PartialEq for ForeignItemFn { eq(&self, other: &Self) -> bool727 fn eq(&self, other: &Self) -> bool { 728 self.attrs == other.attrs && self.vis == other.vis && self.sig == other.sig 729 } 730 } 731 #[cfg(feature = "full")] 732 impl Eq for ForeignItemMacro {} 733 #[cfg(feature = "full")] 734 impl PartialEq for ForeignItemMacro { eq(&self, other: &Self) -> bool735 fn eq(&self, other: &Self) -> bool { 736 self.attrs == other.attrs && self.mac == other.mac && self.semi_token == other.semi_token 737 } 738 } 739 #[cfg(feature = "full")] 740 impl Eq for ForeignItemStatic {} 741 #[cfg(feature = "full")] 742 impl PartialEq for ForeignItemStatic { eq(&self, other: &Self) -> bool743 fn eq(&self, other: &Self) -> bool { 744 self.attrs == other.attrs 745 && self.vis == other.vis 746 && self.mutability == other.mutability 747 && self.ident == other.ident 748 && self.ty == other.ty 749 } 750 } 751 #[cfg(feature = "full")] 752 impl Eq for ForeignItemType {} 753 #[cfg(feature = "full")] 754 impl PartialEq for ForeignItemType { eq(&self, other: &Self) -> bool755 fn eq(&self, other: &Self) -> bool { 756 self.attrs == other.attrs && self.vis == other.vis && self.ident == other.ident 757 } 758 } 759 #[cfg(any(feature = "derive", feature = "full"))] 760 impl Eq for GenericArgument {} 761 #[cfg(any(feature = "derive", feature = "full"))] 762 impl PartialEq for GenericArgument { eq(&self, other: &Self) -> bool763 fn eq(&self, other: &Self) -> bool { 764 match (self, other) { 765 (GenericArgument::Lifetime(self0), GenericArgument::Lifetime(other0)) => { 766 self0 == other0 767 } 768 (GenericArgument::Type(self0), GenericArgument::Type(other0)) => self0 == other0, 769 (GenericArgument::Binding(self0), GenericArgument::Binding(other0)) => self0 == other0, 770 (GenericArgument::Constraint(self0), GenericArgument::Constraint(other0)) => { 771 self0 == other0 772 } 773 (GenericArgument::Const(self0), GenericArgument::Const(other0)) => self0 == other0, 774 _ => false, 775 } 776 } 777 } 778 #[cfg(feature = "full")] 779 impl Eq for GenericMethodArgument {} 780 #[cfg(feature = "full")] 781 impl PartialEq for GenericMethodArgument { eq(&self, other: &Self) -> bool782 fn eq(&self, other: &Self) -> bool { 783 match (self, other) { 784 (GenericMethodArgument::Type(self0), GenericMethodArgument::Type(other0)) => { 785 self0 == other0 786 } 787 (GenericMethodArgument::Const(self0), GenericMethodArgument::Const(other0)) => { 788 self0 == other0 789 } 790 _ => false, 791 } 792 } 793 } 794 #[cfg(any(feature = "derive", feature = "full"))] 795 impl Eq for GenericParam {} 796 #[cfg(any(feature = "derive", feature = "full"))] 797 impl PartialEq for GenericParam { eq(&self, other: &Self) -> bool798 fn eq(&self, other: &Self) -> bool { 799 match (self, other) { 800 (GenericParam::Type(self0), GenericParam::Type(other0)) => self0 == other0, 801 (GenericParam::Lifetime(self0), GenericParam::Lifetime(other0)) => self0 == other0, 802 (GenericParam::Const(self0), GenericParam::Const(other0)) => self0 == other0, 803 _ => false, 804 } 805 } 806 } 807 #[cfg(any(feature = "derive", feature = "full"))] 808 impl Eq for Generics {} 809 #[cfg(any(feature = "derive", feature = "full"))] 810 impl PartialEq for Generics { eq(&self, other: &Self) -> bool811 fn eq(&self, other: &Self) -> bool { 812 self.lt_token == other.lt_token 813 && self.params == other.params 814 && self.gt_token == other.gt_token 815 && self.where_clause == other.where_clause 816 } 817 } 818 #[cfg(feature = "full")] 819 impl Eq for ImplItem {} 820 #[cfg(feature = "full")] 821 impl PartialEq for ImplItem { eq(&self, other: &Self) -> bool822 fn eq(&self, other: &Self) -> bool { 823 match (self, other) { 824 (ImplItem::Const(self0), ImplItem::Const(other0)) => self0 == other0, 825 (ImplItem::Method(self0), ImplItem::Method(other0)) => self0 == other0, 826 (ImplItem::Type(self0), ImplItem::Type(other0)) => self0 == other0, 827 (ImplItem::Macro(self0), ImplItem::Macro(other0)) => self0 == other0, 828 (ImplItem::Verbatim(self0), ImplItem::Verbatim(other0)) => { 829 TokenStreamHelper(self0) == TokenStreamHelper(other0) 830 } 831 _ => false, 832 } 833 } 834 } 835 #[cfg(feature = "full")] 836 impl Eq for ImplItemConst {} 837 #[cfg(feature = "full")] 838 impl PartialEq for ImplItemConst { eq(&self, other: &Self) -> bool839 fn eq(&self, other: &Self) -> bool { 840 self.attrs == other.attrs 841 && self.vis == other.vis 842 && self.defaultness == other.defaultness 843 && self.ident == other.ident 844 && self.ty == other.ty 845 && self.expr == other.expr 846 } 847 } 848 #[cfg(feature = "full")] 849 impl Eq for ImplItemMacro {} 850 #[cfg(feature = "full")] 851 impl PartialEq for ImplItemMacro { eq(&self, other: &Self) -> bool852 fn eq(&self, other: &Self) -> bool { 853 self.attrs == other.attrs && self.mac == other.mac && self.semi_token == other.semi_token 854 } 855 } 856 #[cfg(feature = "full")] 857 impl Eq for ImplItemMethod {} 858 #[cfg(feature = "full")] 859 impl PartialEq for ImplItemMethod { eq(&self, other: &Self) -> bool860 fn eq(&self, other: &Self) -> bool { 861 self.attrs == other.attrs 862 && self.vis == other.vis 863 && self.defaultness == other.defaultness 864 && self.sig == other.sig 865 && self.block == other.block 866 } 867 } 868 #[cfg(feature = "full")] 869 impl Eq for ImplItemType {} 870 #[cfg(feature = "full")] 871 impl PartialEq for ImplItemType { eq(&self, other: &Self) -> bool872 fn eq(&self, other: &Self) -> bool { 873 self.attrs == other.attrs 874 && self.vis == other.vis 875 && self.defaultness == other.defaultness 876 && self.ident == other.ident 877 && self.generics == other.generics 878 && self.ty == other.ty 879 } 880 } 881 #[cfg(feature = "full")] 882 impl Eq for Item {} 883 #[cfg(feature = "full")] 884 impl PartialEq for Item { eq(&self, other: &Self) -> bool885 fn eq(&self, other: &Self) -> bool { 886 match (self, other) { 887 (Item::Const(self0), Item::Const(other0)) => self0 == other0, 888 (Item::Enum(self0), Item::Enum(other0)) => self0 == other0, 889 (Item::ExternCrate(self0), Item::ExternCrate(other0)) => self0 == other0, 890 (Item::Fn(self0), Item::Fn(other0)) => self0 == other0, 891 (Item::ForeignMod(self0), Item::ForeignMod(other0)) => self0 == other0, 892 (Item::Impl(self0), Item::Impl(other0)) => self0 == other0, 893 (Item::Macro(self0), Item::Macro(other0)) => self0 == other0, 894 (Item::Macro2(self0), Item::Macro2(other0)) => self0 == other0, 895 (Item::Mod(self0), Item::Mod(other0)) => self0 == other0, 896 (Item::Static(self0), Item::Static(other0)) => self0 == other0, 897 (Item::Struct(self0), Item::Struct(other0)) => self0 == other0, 898 (Item::Trait(self0), Item::Trait(other0)) => self0 == other0, 899 (Item::TraitAlias(self0), Item::TraitAlias(other0)) => self0 == other0, 900 (Item::Type(self0), Item::Type(other0)) => self0 == other0, 901 (Item::Union(self0), Item::Union(other0)) => self0 == other0, 902 (Item::Use(self0), Item::Use(other0)) => self0 == other0, 903 (Item::Verbatim(self0), Item::Verbatim(other0)) => { 904 TokenStreamHelper(self0) == TokenStreamHelper(other0) 905 } 906 _ => false, 907 } 908 } 909 } 910 #[cfg(feature = "full")] 911 impl Eq for ItemConst {} 912 #[cfg(feature = "full")] 913 impl PartialEq for ItemConst { eq(&self, other: &Self) -> bool914 fn eq(&self, other: &Self) -> bool { 915 self.attrs == other.attrs 916 && self.vis == other.vis 917 && self.ident == other.ident 918 && self.ty == other.ty 919 && self.expr == other.expr 920 } 921 } 922 #[cfg(feature = "full")] 923 impl Eq for ItemEnum {} 924 #[cfg(feature = "full")] 925 impl PartialEq for ItemEnum { eq(&self, other: &Self) -> bool926 fn eq(&self, other: &Self) -> bool { 927 self.attrs == other.attrs 928 && self.vis == other.vis 929 && self.ident == other.ident 930 && self.generics == other.generics 931 && self.variants == other.variants 932 } 933 } 934 #[cfg(feature = "full")] 935 impl Eq for ItemExternCrate {} 936 #[cfg(feature = "full")] 937 impl PartialEq for ItemExternCrate { eq(&self, other: &Self) -> bool938 fn eq(&self, other: &Self) -> bool { 939 self.attrs == other.attrs 940 && self.vis == other.vis 941 && self.ident == other.ident 942 && self.rename == other.rename 943 } 944 } 945 #[cfg(feature = "full")] 946 impl Eq for ItemFn {} 947 #[cfg(feature = "full")] 948 impl PartialEq for ItemFn { eq(&self, other: &Self) -> bool949 fn eq(&self, other: &Self) -> bool { 950 self.attrs == other.attrs 951 && self.vis == other.vis 952 && self.sig == other.sig 953 && self.block == other.block 954 } 955 } 956 #[cfg(feature = "full")] 957 impl Eq for ItemForeignMod {} 958 #[cfg(feature = "full")] 959 impl PartialEq for ItemForeignMod { eq(&self, other: &Self) -> bool960 fn eq(&self, other: &Self) -> bool { 961 self.attrs == other.attrs && self.abi == other.abi && self.items == other.items 962 } 963 } 964 #[cfg(feature = "full")] 965 impl Eq for ItemImpl {} 966 #[cfg(feature = "full")] 967 impl PartialEq for ItemImpl { eq(&self, other: &Self) -> bool968 fn eq(&self, other: &Self) -> bool { 969 self.attrs == other.attrs 970 && self.defaultness == other.defaultness 971 && self.unsafety == other.unsafety 972 && self.generics == other.generics 973 && self.trait_ == other.trait_ 974 && self.self_ty == other.self_ty 975 && self.items == other.items 976 } 977 } 978 #[cfg(feature = "full")] 979 impl Eq for ItemMacro {} 980 #[cfg(feature = "full")] 981 impl PartialEq for ItemMacro { eq(&self, other: &Self) -> bool982 fn eq(&self, other: &Self) -> bool { 983 self.attrs == other.attrs 984 && self.ident == other.ident 985 && self.mac == other.mac 986 && self.semi_token == other.semi_token 987 } 988 } 989 #[cfg(feature = "full")] 990 impl Eq for ItemMacro2 {} 991 #[cfg(feature = "full")] 992 impl PartialEq for ItemMacro2 { eq(&self, other: &Self) -> bool993 fn eq(&self, other: &Self) -> bool { 994 self.attrs == other.attrs 995 && self.vis == other.vis 996 && self.ident == other.ident 997 && TokenStreamHelper(&self.rules) == TokenStreamHelper(&other.rules) 998 } 999 } 1000 #[cfg(feature = "full")] 1001 impl Eq for ItemMod {} 1002 #[cfg(feature = "full")] 1003 impl PartialEq for ItemMod { eq(&self, other: &Self) -> bool1004 fn eq(&self, other: &Self) -> bool { 1005 self.attrs == other.attrs 1006 && self.vis == other.vis 1007 && self.ident == other.ident 1008 && self.content == other.content 1009 && self.semi == other.semi 1010 } 1011 } 1012 #[cfg(feature = "full")] 1013 impl Eq for ItemStatic {} 1014 #[cfg(feature = "full")] 1015 impl PartialEq for ItemStatic { eq(&self, other: &Self) -> bool1016 fn eq(&self, other: &Self) -> bool { 1017 self.attrs == other.attrs 1018 && self.vis == other.vis 1019 && self.mutability == other.mutability 1020 && self.ident == other.ident 1021 && self.ty == other.ty 1022 && self.expr == other.expr 1023 } 1024 } 1025 #[cfg(feature = "full")] 1026 impl Eq for ItemStruct {} 1027 #[cfg(feature = "full")] 1028 impl PartialEq for ItemStruct { eq(&self, other: &Self) -> bool1029 fn eq(&self, other: &Self) -> bool { 1030 self.attrs == other.attrs 1031 && self.vis == other.vis 1032 && self.ident == other.ident 1033 && self.generics == other.generics 1034 && self.fields == other.fields 1035 && self.semi_token == other.semi_token 1036 } 1037 } 1038 #[cfg(feature = "full")] 1039 impl Eq for ItemTrait {} 1040 #[cfg(feature = "full")] 1041 impl PartialEq for ItemTrait { eq(&self, other: &Self) -> bool1042 fn eq(&self, other: &Self) -> bool { 1043 self.attrs == other.attrs 1044 && self.vis == other.vis 1045 && self.unsafety == other.unsafety 1046 && self.auto_token == other.auto_token 1047 && self.ident == other.ident 1048 && self.generics == other.generics 1049 && self.colon_token == other.colon_token 1050 && self.supertraits == other.supertraits 1051 && self.items == other.items 1052 } 1053 } 1054 #[cfg(feature = "full")] 1055 impl Eq for ItemTraitAlias {} 1056 #[cfg(feature = "full")] 1057 impl PartialEq for ItemTraitAlias { eq(&self, other: &Self) -> bool1058 fn eq(&self, other: &Self) -> bool { 1059 self.attrs == other.attrs 1060 && self.vis == other.vis 1061 && self.ident == other.ident 1062 && self.generics == other.generics 1063 && self.bounds == other.bounds 1064 } 1065 } 1066 #[cfg(feature = "full")] 1067 impl Eq for ItemType {} 1068 #[cfg(feature = "full")] 1069 impl PartialEq for ItemType { eq(&self, other: &Self) -> bool1070 fn eq(&self, other: &Self) -> bool { 1071 self.attrs == other.attrs 1072 && self.vis == other.vis 1073 && self.ident == other.ident 1074 && self.generics == other.generics 1075 && self.ty == other.ty 1076 } 1077 } 1078 #[cfg(feature = "full")] 1079 impl Eq for ItemUnion {} 1080 #[cfg(feature = "full")] 1081 impl PartialEq for ItemUnion { eq(&self, other: &Self) -> bool1082 fn eq(&self, other: &Self) -> bool { 1083 self.attrs == other.attrs 1084 && self.vis == other.vis 1085 && self.ident == other.ident 1086 && self.generics == other.generics 1087 && self.fields == other.fields 1088 } 1089 } 1090 #[cfg(feature = "full")] 1091 impl Eq for ItemUse {} 1092 #[cfg(feature = "full")] 1093 impl PartialEq for ItemUse { eq(&self, other: &Self) -> bool1094 fn eq(&self, other: &Self) -> bool { 1095 self.attrs == other.attrs 1096 && self.vis == other.vis 1097 && self.leading_colon == other.leading_colon 1098 && self.tree == other.tree 1099 } 1100 } 1101 #[cfg(feature = "full")] 1102 impl Eq for Label {} 1103 #[cfg(feature = "full")] 1104 impl PartialEq for Label { eq(&self, other: &Self) -> bool1105 fn eq(&self, other: &Self) -> bool { 1106 self.name == other.name 1107 } 1108 } 1109 #[cfg(any(feature = "derive", feature = "full"))] 1110 impl Eq for LifetimeDef {} 1111 #[cfg(any(feature = "derive", feature = "full"))] 1112 impl PartialEq for LifetimeDef { eq(&self, other: &Self) -> bool1113 fn eq(&self, other: &Self) -> bool { 1114 self.attrs == other.attrs 1115 && self.lifetime == other.lifetime 1116 && self.colon_token == other.colon_token 1117 && self.bounds == other.bounds 1118 } 1119 } 1120 impl Eq for Lit {} 1121 impl PartialEq for Lit { eq(&self, other: &Self) -> bool1122 fn eq(&self, other: &Self) -> bool { 1123 match (self, other) { 1124 (Lit::Str(self0), Lit::Str(other0)) => self0 == other0, 1125 (Lit::ByteStr(self0), Lit::ByteStr(other0)) => self0 == other0, 1126 (Lit::Byte(self0), Lit::Byte(other0)) => self0 == other0, 1127 (Lit::Char(self0), Lit::Char(other0)) => self0 == other0, 1128 (Lit::Int(self0), Lit::Int(other0)) => self0 == other0, 1129 (Lit::Float(self0), Lit::Float(other0)) => self0 == other0, 1130 (Lit::Bool(self0), Lit::Bool(other0)) => self0 == other0, 1131 (Lit::Verbatim(self0), Lit::Verbatim(other0)) => { 1132 self0.to_string() == other0.to_string() 1133 } 1134 _ => false, 1135 } 1136 } 1137 } 1138 impl Eq for LitBool {} 1139 impl PartialEq for LitBool { eq(&self, other: &Self) -> bool1140 fn eq(&self, other: &Self) -> bool { 1141 self.value == other.value 1142 } 1143 } 1144 impl Eq for LitByte {} 1145 impl Eq for LitByteStr {} 1146 impl Eq for LitChar {} 1147 impl Eq for LitFloat {} 1148 impl Eq for LitInt {} 1149 impl Eq for LitStr {} 1150 #[cfg(feature = "full")] 1151 impl Eq for Local {} 1152 #[cfg(feature = "full")] 1153 impl PartialEq for Local { eq(&self, other: &Self) -> bool1154 fn eq(&self, other: &Self) -> bool { 1155 self.attrs == other.attrs && self.pat == other.pat && self.init == other.init 1156 } 1157 } 1158 #[cfg(any(feature = "derive", feature = "full"))] 1159 impl Eq for Macro {} 1160 #[cfg(any(feature = "derive", feature = "full"))] 1161 impl PartialEq for Macro { eq(&self, other: &Self) -> bool1162 fn eq(&self, other: &Self) -> bool { 1163 self.path == other.path 1164 && self.delimiter == other.delimiter 1165 && TokenStreamHelper(&self.tokens) == TokenStreamHelper(&other.tokens) 1166 } 1167 } 1168 #[cfg(any(feature = "derive", feature = "full"))] 1169 impl Eq for MacroDelimiter {} 1170 #[cfg(any(feature = "derive", feature = "full"))] 1171 impl PartialEq for MacroDelimiter { eq(&self, other: &Self) -> bool1172 fn eq(&self, other: &Self) -> bool { 1173 match (self, other) { 1174 (MacroDelimiter::Paren(_), MacroDelimiter::Paren(_)) => true, 1175 (MacroDelimiter::Brace(_), MacroDelimiter::Brace(_)) => true, 1176 (MacroDelimiter::Bracket(_), MacroDelimiter::Bracket(_)) => true, 1177 _ => false, 1178 } 1179 } 1180 } 1181 #[cfg(any(feature = "derive", feature = "full"))] 1182 impl Eq for Meta {} 1183 #[cfg(any(feature = "derive", feature = "full"))] 1184 impl PartialEq for Meta { eq(&self, other: &Self) -> bool1185 fn eq(&self, other: &Self) -> bool { 1186 match (self, other) { 1187 (Meta::Path(self0), Meta::Path(other0)) => self0 == other0, 1188 (Meta::List(self0), Meta::List(other0)) => self0 == other0, 1189 (Meta::NameValue(self0), Meta::NameValue(other0)) => self0 == other0, 1190 _ => false, 1191 } 1192 } 1193 } 1194 #[cfg(any(feature = "derive", feature = "full"))] 1195 impl Eq for MetaList {} 1196 #[cfg(any(feature = "derive", feature = "full"))] 1197 impl PartialEq for MetaList { eq(&self, other: &Self) -> bool1198 fn eq(&self, other: &Self) -> bool { 1199 self.path == other.path && self.nested == other.nested 1200 } 1201 } 1202 #[cfg(any(feature = "derive", feature = "full"))] 1203 impl Eq for MetaNameValue {} 1204 #[cfg(any(feature = "derive", feature = "full"))] 1205 impl PartialEq for MetaNameValue { eq(&self, other: &Self) -> bool1206 fn eq(&self, other: &Self) -> bool { 1207 self.path == other.path && self.lit == other.lit 1208 } 1209 } 1210 #[cfg(feature = "full")] 1211 impl Eq for MethodTurbofish {} 1212 #[cfg(feature = "full")] 1213 impl PartialEq for MethodTurbofish { eq(&self, other: &Self) -> bool1214 fn eq(&self, other: &Self) -> bool { 1215 self.args == other.args 1216 } 1217 } 1218 #[cfg(any(feature = "derive", feature = "full"))] 1219 impl Eq for NestedMeta {} 1220 #[cfg(any(feature = "derive", feature = "full"))] 1221 impl PartialEq for NestedMeta { eq(&self, other: &Self) -> bool1222 fn eq(&self, other: &Self) -> bool { 1223 match (self, other) { 1224 (NestedMeta::Meta(self0), NestedMeta::Meta(other0)) => self0 == other0, 1225 (NestedMeta::Lit(self0), NestedMeta::Lit(other0)) => self0 == other0, 1226 _ => false, 1227 } 1228 } 1229 } 1230 #[cfg(any(feature = "derive", feature = "full"))] 1231 impl Eq for ParenthesizedGenericArguments {} 1232 #[cfg(any(feature = "derive", feature = "full"))] 1233 impl PartialEq for ParenthesizedGenericArguments { eq(&self, other: &Self) -> bool1234 fn eq(&self, other: &Self) -> bool { 1235 self.inputs == other.inputs && self.output == other.output 1236 } 1237 } 1238 #[cfg(feature = "full")] 1239 impl Eq for Pat {} 1240 #[cfg(feature = "full")] 1241 impl PartialEq for Pat { eq(&self, other: &Self) -> bool1242 fn eq(&self, other: &Self) -> bool { 1243 match (self, other) { 1244 (Pat::Box(self0), Pat::Box(other0)) => self0 == other0, 1245 (Pat::Ident(self0), Pat::Ident(other0)) => self0 == other0, 1246 (Pat::Lit(self0), Pat::Lit(other0)) => self0 == other0, 1247 (Pat::Macro(self0), Pat::Macro(other0)) => self0 == other0, 1248 (Pat::Or(self0), Pat::Or(other0)) => self0 == other0, 1249 (Pat::Path(self0), Pat::Path(other0)) => self0 == other0, 1250 (Pat::Range(self0), Pat::Range(other0)) => self0 == other0, 1251 (Pat::Reference(self0), Pat::Reference(other0)) => self0 == other0, 1252 (Pat::Rest(self0), Pat::Rest(other0)) => self0 == other0, 1253 (Pat::Slice(self0), Pat::Slice(other0)) => self0 == other0, 1254 (Pat::Struct(self0), Pat::Struct(other0)) => self0 == other0, 1255 (Pat::Tuple(self0), Pat::Tuple(other0)) => self0 == other0, 1256 (Pat::TupleStruct(self0), Pat::TupleStruct(other0)) => self0 == other0, 1257 (Pat::Type(self0), Pat::Type(other0)) => self0 == other0, 1258 (Pat::Verbatim(self0), Pat::Verbatim(other0)) => { 1259 TokenStreamHelper(self0) == TokenStreamHelper(other0) 1260 } 1261 (Pat::Wild(self0), Pat::Wild(other0)) => self0 == other0, 1262 _ => false, 1263 } 1264 } 1265 } 1266 #[cfg(feature = "full")] 1267 impl Eq for PatBox {} 1268 #[cfg(feature = "full")] 1269 impl PartialEq for PatBox { eq(&self, other: &Self) -> bool1270 fn eq(&self, other: &Self) -> bool { 1271 self.attrs == other.attrs && self.pat == other.pat 1272 } 1273 } 1274 #[cfg(feature = "full")] 1275 impl Eq for PatIdent {} 1276 #[cfg(feature = "full")] 1277 impl PartialEq for PatIdent { eq(&self, other: &Self) -> bool1278 fn eq(&self, other: &Self) -> bool { 1279 self.attrs == other.attrs 1280 && self.by_ref == other.by_ref 1281 && self.mutability == other.mutability 1282 && self.ident == other.ident 1283 && self.subpat == other.subpat 1284 } 1285 } 1286 #[cfg(feature = "full")] 1287 impl Eq for PatLit {} 1288 #[cfg(feature = "full")] 1289 impl PartialEq for PatLit { eq(&self, other: &Self) -> bool1290 fn eq(&self, other: &Self) -> bool { 1291 self.attrs == other.attrs && self.expr == other.expr 1292 } 1293 } 1294 #[cfg(feature = "full")] 1295 impl Eq for PatMacro {} 1296 #[cfg(feature = "full")] 1297 impl PartialEq for PatMacro { eq(&self, other: &Self) -> bool1298 fn eq(&self, other: &Self) -> bool { 1299 self.attrs == other.attrs && self.mac == other.mac 1300 } 1301 } 1302 #[cfg(feature = "full")] 1303 impl Eq for PatOr {} 1304 #[cfg(feature = "full")] 1305 impl PartialEq for PatOr { eq(&self, other: &Self) -> bool1306 fn eq(&self, other: &Self) -> bool { 1307 self.attrs == other.attrs 1308 && self.leading_vert == other.leading_vert 1309 && self.cases == other.cases 1310 } 1311 } 1312 #[cfg(feature = "full")] 1313 impl Eq for PatPath {} 1314 #[cfg(feature = "full")] 1315 impl PartialEq for PatPath { eq(&self, other: &Self) -> bool1316 fn eq(&self, other: &Self) -> bool { 1317 self.attrs == other.attrs && self.qself == other.qself && self.path == other.path 1318 } 1319 } 1320 #[cfg(feature = "full")] 1321 impl Eq for PatRange {} 1322 #[cfg(feature = "full")] 1323 impl PartialEq for PatRange { eq(&self, other: &Self) -> bool1324 fn eq(&self, other: &Self) -> bool { 1325 self.attrs == other.attrs 1326 && self.lo == other.lo 1327 && self.limits == other.limits 1328 && self.hi == other.hi 1329 } 1330 } 1331 #[cfg(feature = "full")] 1332 impl Eq for PatReference {} 1333 #[cfg(feature = "full")] 1334 impl PartialEq for PatReference { eq(&self, other: &Self) -> bool1335 fn eq(&self, other: &Self) -> bool { 1336 self.attrs == other.attrs && self.mutability == other.mutability && self.pat == other.pat 1337 } 1338 } 1339 #[cfg(feature = "full")] 1340 impl Eq for PatRest {} 1341 #[cfg(feature = "full")] 1342 impl PartialEq for PatRest { eq(&self, other: &Self) -> bool1343 fn eq(&self, other: &Self) -> bool { 1344 self.attrs == other.attrs 1345 } 1346 } 1347 #[cfg(feature = "full")] 1348 impl Eq for PatSlice {} 1349 #[cfg(feature = "full")] 1350 impl PartialEq for PatSlice { eq(&self, other: &Self) -> bool1351 fn eq(&self, other: &Self) -> bool { 1352 self.attrs == other.attrs && self.elems == other.elems 1353 } 1354 } 1355 #[cfg(feature = "full")] 1356 impl Eq for PatStruct {} 1357 #[cfg(feature = "full")] 1358 impl PartialEq for PatStruct { eq(&self, other: &Self) -> bool1359 fn eq(&self, other: &Self) -> bool { 1360 self.attrs == other.attrs 1361 && self.path == other.path 1362 && self.fields == other.fields 1363 && self.dot2_token == other.dot2_token 1364 } 1365 } 1366 #[cfg(feature = "full")] 1367 impl Eq for PatTuple {} 1368 #[cfg(feature = "full")] 1369 impl PartialEq for PatTuple { eq(&self, other: &Self) -> bool1370 fn eq(&self, other: &Self) -> bool { 1371 self.attrs == other.attrs && self.elems == other.elems 1372 } 1373 } 1374 #[cfg(feature = "full")] 1375 impl Eq for PatTupleStruct {} 1376 #[cfg(feature = "full")] 1377 impl PartialEq for PatTupleStruct { eq(&self, other: &Self) -> bool1378 fn eq(&self, other: &Self) -> bool { 1379 self.attrs == other.attrs && self.path == other.path && self.pat == other.pat 1380 } 1381 } 1382 #[cfg(feature = "full")] 1383 impl Eq for PatType {} 1384 #[cfg(feature = "full")] 1385 impl PartialEq for PatType { eq(&self, other: &Self) -> bool1386 fn eq(&self, other: &Self) -> bool { 1387 self.attrs == other.attrs && self.pat == other.pat && self.ty == other.ty 1388 } 1389 } 1390 #[cfg(feature = "full")] 1391 impl Eq for PatWild {} 1392 #[cfg(feature = "full")] 1393 impl PartialEq for PatWild { eq(&self, other: &Self) -> bool1394 fn eq(&self, other: &Self) -> bool { 1395 self.attrs == other.attrs 1396 } 1397 } 1398 #[cfg(any(feature = "derive", feature = "full"))] 1399 impl Eq for Path {} 1400 #[cfg(any(feature = "derive", feature = "full"))] 1401 impl PartialEq for Path { eq(&self, other: &Self) -> bool1402 fn eq(&self, other: &Self) -> bool { 1403 self.leading_colon == other.leading_colon && self.segments == other.segments 1404 } 1405 } 1406 #[cfg(any(feature = "derive", feature = "full"))] 1407 impl Eq for PathArguments {} 1408 #[cfg(any(feature = "derive", feature = "full"))] 1409 impl PartialEq for PathArguments { eq(&self, other: &Self) -> bool1410 fn eq(&self, other: &Self) -> bool { 1411 match (self, other) { 1412 (PathArguments::None, PathArguments::None) => true, 1413 (PathArguments::AngleBracketed(self0), PathArguments::AngleBracketed(other0)) => { 1414 self0 == other0 1415 } 1416 (PathArguments::Parenthesized(self0), PathArguments::Parenthesized(other0)) => { 1417 self0 == other0 1418 } 1419 _ => false, 1420 } 1421 } 1422 } 1423 #[cfg(any(feature = "derive", feature = "full"))] 1424 impl Eq for PathSegment {} 1425 #[cfg(any(feature = "derive", feature = "full"))] 1426 impl PartialEq for PathSegment { eq(&self, other: &Self) -> bool1427 fn eq(&self, other: &Self) -> bool { 1428 self.ident == other.ident && self.arguments == other.arguments 1429 } 1430 } 1431 #[cfg(any(feature = "derive", feature = "full"))] 1432 impl Eq for PredicateEq {} 1433 #[cfg(any(feature = "derive", feature = "full"))] 1434 impl PartialEq for PredicateEq { eq(&self, other: &Self) -> bool1435 fn eq(&self, other: &Self) -> bool { 1436 self.lhs_ty == other.lhs_ty && self.rhs_ty == other.rhs_ty 1437 } 1438 } 1439 #[cfg(any(feature = "derive", feature = "full"))] 1440 impl Eq for PredicateLifetime {} 1441 #[cfg(any(feature = "derive", feature = "full"))] 1442 impl PartialEq for PredicateLifetime { eq(&self, other: &Self) -> bool1443 fn eq(&self, other: &Self) -> bool { 1444 self.lifetime == other.lifetime && self.bounds == other.bounds 1445 } 1446 } 1447 #[cfg(any(feature = "derive", feature = "full"))] 1448 impl Eq for PredicateType {} 1449 #[cfg(any(feature = "derive", feature = "full"))] 1450 impl PartialEq for PredicateType { eq(&self, other: &Self) -> bool1451 fn eq(&self, other: &Self) -> bool { 1452 self.lifetimes == other.lifetimes 1453 && self.bounded_ty == other.bounded_ty 1454 && self.bounds == other.bounds 1455 } 1456 } 1457 #[cfg(any(feature = "derive", feature = "full"))] 1458 impl Eq for QSelf {} 1459 #[cfg(any(feature = "derive", feature = "full"))] 1460 impl PartialEq for QSelf { eq(&self, other: &Self) -> bool1461 fn eq(&self, other: &Self) -> bool { 1462 self.ty == other.ty && self.position == other.position && self.as_token == other.as_token 1463 } 1464 } 1465 #[cfg(feature = "full")] 1466 impl Eq for RangeLimits {} 1467 #[cfg(feature = "full")] 1468 impl PartialEq for RangeLimits { eq(&self, other: &Self) -> bool1469 fn eq(&self, other: &Self) -> bool { 1470 match (self, other) { 1471 (RangeLimits::HalfOpen(_), RangeLimits::HalfOpen(_)) => true, 1472 (RangeLimits::Closed(_), RangeLimits::Closed(_)) => true, 1473 _ => false, 1474 } 1475 } 1476 } 1477 #[cfg(feature = "full")] 1478 impl Eq for Receiver {} 1479 #[cfg(feature = "full")] 1480 impl PartialEq for Receiver { eq(&self, other: &Self) -> bool1481 fn eq(&self, other: &Self) -> bool { 1482 self.attrs == other.attrs 1483 && self.reference == other.reference 1484 && self.mutability == other.mutability 1485 } 1486 } 1487 #[cfg(any(feature = "derive", feature = "full"))] 1488 impl Eq for ReturnType {} 1489 #[cfg(any(feature = "derive", feature = "full"))] 1490 impl PartialEq for ReturnType { eq(&self, other: &Self) -> bool1491 fn eq(&self, other: &Self) -> bool { 1492 match (self, other) { 1493 (ReturnType::Default, ReturnType::Default) => true, 1494 (ReturnType::Type(_, self1), ReturnType::Type(_, other1)) => self1 == other1, 1495 _ => false, 1496 } 1497 } 1498 } 1499 #[cfg(feature = "full")] 1500 impl Eq for Signature {} 1501 #[cfg(feature = "full")] 1502 impl PartialEq for Signature { eq(&self, other: &Self) -> bool1503 fn eq(&self, other: &Self) -> bool { 1504 self.constness == other.constness 1505 && self.asyncness == other.asyncness 1506 && self.unsafety == other.unsafety 1507 && self.abi == other.abi 1508 && self.ident == other.ident 1509 && self.generics == other.generics 1510 && self.inputs == other.inputs 1511 && self.variadic == other.variadic 1512 && self.output == other.output 1513 } 1514 } 1515 #[cfg(feature = "full")] 1516 impl Eq for Stmt {} 1517 #[cfg(feature = "full")] 1518 impl PartialEq for Stmt { eq(&self, other: &Self) -> bool1519 fn eq(&self, other: &Self) -> bool { 1520 match (self, other) { 1521 (Stmt::Local(self0), Stmt::Local(other0)) => self0 == other0, 1522 (Stmt::Item(self0), Stmt::Item(other0)) => self0 == other0, 1523 (Stmt::Expr(self0), Stmt::Expr(other0)) => self0 == other0, 1524 (Stmt::Semi(self0, _), Stmt::Semi(other0, _)) => self0 == other0, 1525 _ => false, 1526 } 1527 } 1528 } 1529 #[cfg(any(feature = "derive", feature = "full"))] 1530 impl Eq for TraitBound {} 1531 #[cfg(any(feature = "derive", feature = "full"))] 1532 impl PartialEq for TraitBound { eq(&self, other: &Self) -> bool1533 fn eq(&self, other: &Self) -> bool { 1534 self.paren_token == other.paren_token 1535 && self.modifier == other.modifier 1536 && self.lifetimes == other.lifetimes 1537 && self.path == other.path 1538 } 1539 } 1540 #[cfg(any(feature = "derive", feature = "full"))] 1541 impl Eq for TraitBoundModifier {} 1542 #[cfg(any(feature = "derive", feature = "full"))] 1543 impl PartialEq for TraitBoundModifier { eq(&self, other: &Self) -> bool1544 fn eq(&self, other: &Self) -> bool { 1545 match (self, other) { 1546 (TraitBoundModifier::None, TraitBoundModifier::None) => true, 1547 (TraitBoundModifier::Maybe(_), TraitBoundModifier::Maybe(_)) => true, 1548 _ => false, 1549 } 1550 } 1551 } 1552 #[cfg(feature = "full")] 1553 impl Eq for TraitItem {} 1554 #[cfg(feature = "full")] 1555 impl PartialEq for TraitItem { eq(&self, other: &Self) -> bool1556 fn eq(&self, other: &Self) -> bool { 1557 match (self, other) { 1558 (TraitItem::Const(self0), TraitItem::Const(other0)) => self0 == other0, 1559 (TraitItem::Method(self0), TraitItem::Method(other0)) => self0 == other0, 1560 (TraitItem::Type(self0), TraitItem::Type(other0)) => self0 == other0, 1561 (TraitItem::Macro(self0), TraitItem::Macro(other0)) => self0 == other0, 1562 (TraitItem::Verbatim(self0), TraitItem::Verbatim(other0)) => { 1563 TokenStreamHelper(self0) == TokenStreamHelper(other0) 1564 } 1565 _ => false, 1566 } 1567 } 1568 } 1569 #[cfg(feature = "full")] 1570 impl Eq for TraitItemConst {} 1571 #[cfg(feature = "full")] 1572 impl PartialEq for TraitItemConst { eq(&self, other: &Self) -> bool1573 fn eq(&self, other: &Self) -> bool { 1574 self.attrs == other.attrs 1575 && self.ident == other.ident 1576 && self.ty == other.ty 1577 && self.default == other.default 1578 } 1579 } 1580 #[cfg(feature = "full")] 1581 impl Eq for TraitItemMacro {} 1582 #[cfg(feature = "full")] 1583 impl PartialEq for TraitItemMacro { eq(&self, other: &Self) -> bool1584 fn eq(&self, other: &Self) -> bool { 1585 self.attrs == other.attrs && self.mac == other.mac && self.semi_token == other.semi_token 1586 } 1587 } 1588 #[cfg(feature = "full")] 1589 impl Eq for TraitItemMethod {} 1590 #[cfg(feature = "full")] 1591 impl PartialEq for TraitItemMethod { eq(&self, other: &Self) -> bool1592 fn eq(&self, other: &Self) -> bool { 1593 self.attrs == other.attrs 1594 && self.sig == other.sig 1595 && self.default == other.default 1596 && self.semi_token == other.semi_token 1597 } 1598 } 1599 #[cfg(feature = "full")] 1600 impl Eq for TraitItemType {} 1601 #[cfg(feature = "full")] 1602 impl PartialEq for TraitItemType { eq(&self, other: &Self) -> bool1603 fn eq(&self, other: &Self) -> bool { 1604 self.attrs == other.attrs 1605 && self.ident == other.ident 1606 && self.generics == other.generics 1607 && self.colon_token == other.colon_token 1608 && self.bounds == other.bounds 1609 && self.default == other.default 1610 } 1611 } 1612 #[cfg(any(feature = "derive", feature = "full"))] 1613 impl Eq for Type {} 1614 #[cfg(any(feature = "derive", feature = "full"))] 1615 impl PartialEq for Type { eq(&self, other: &Self) -> bool1616 fn eq(&self, other: &Self) -> bool { 1617 match (self, other) { 1618 (Type::Array(self0), Type::Array(other0)) => self0 == other0, 1619 (Type::BareFn(self0), Type::BareFn(other0)) => self0 == other0, 1620 (Type::Group(self0), Type::Group(other0)) => self0 == other0, 1621 (Type::ImplTrait(self0), Type::ImplTrait(other0)) => self0 == other0, 1622 (Type::Infer(self0), Type::Infer(other0)) => self0 == other0, 1623 (Type::Macro(self0), Type::Macro(other0)) => self0 == other0, 1624 (Type::Never(self0), Type::Never(other0)) => self0 == other0, 1625 (Type::Paren(self0), Type::Paren(other0)) => self0 == other0, 1626 (Type::Path(self0), Type::Path(other0)) => self0 == other0, 1627 (Type::Ptr(self0), Type::Ptr(other0)) => self0 == other0, 1628 (Type::Reference(self0), Type::Reference(other0)) => self0 == other0, 1629 (Type::Slice(self0), Type::Slice(other0)) => self0 == other0, 1630 (Type::TraitObject(self0), Type::TraitObject(other0)) => self0 == other0, 1631 (Type::Tuple(self0), Type::Tuple(other0)) => self0 == other0, 1632 (Type::Verbatim(self0), Type::Verbatim(other0)) => { 1633 TokenStreamHelper(self0) == TokenStreamHelper(other0) 1634 } 1635 _ => false, 1636 } 1637 } 1638 } 1639 #[cfg(any(feature = "derive", feature = "full"))] 1640 impl Eq for TypeArray {} 1641 #[cfg(any(feature = "derive", feature = "full"))] 1642 impl PartialEq for TypeArray { eq(&self, other: &Self) -> bool1643 fn eq(&self, other: &Self) -> bool { 1644 self.elem == other.elem && self.len == other.len 1645 } 1646 } 1647 #[cfg(any(feature = "derive", feature = "full"))] 1648 impl Eq for TypeBareFn {} 1649 #[cfg(any(feature = "derive", feature = "full"))] 1650 impl PartialEq for TypeBareFn { eq(&self, other: &Self) -> bool1651 fn eq(&self, other: &Self) -> bool { 1652 self.lifetimes == other.lifetimes 1653 && self.unsafety == other.unsafety 1654 && self.abi == other.abi 1655 && self.inputs == other.inputs 1656 && self.variadic == other.variadic 1657 && self.output == other.output 1658 } 1659 } 1660 #[cfg(any(feature = "derive", feature = "full"))] 1661 impl Eq for TypeGroup {} 1662 #[cfg(any(feature = "derive", feature = "full"))] 1663 impl PartialEq for TypeGroup { eq(&self, other: &Self) -> bool1664 fn eq(&self, other: &Self) -> bool { 1665 self.elem == other.elem 1666 } 1667 } 1668 #[cfg(any(feature = "derive", feature = "full"))] 1669 impl Eq for TypeImplTrait {} 1670 #[cfg(any(feature = "derive", feature = "full"))] 1671 impl PartialEq for TypeImplTrait { eq(&self, other: &Self) -> bool1672 fn eq(&self, other: &Self) -> bool { 1673 self.bounds == other.bounds 1674 } 1675 } 1676 #[cfg(any(feature = "derive", feature = "full"))] 1677 impl Eq for TypeInfer {} 1678 #[cfg(any(feature = "derive", feature = "full"))] 1679 impl PartialEq for TypeInfer { eq(&self, _other: &Self) -> bool1680 fn eq(&self, _other: &Self) -> bool { 1681 true 1682 } 1683 } 1684 #[cfg(any(feature = "derive", feature = "full"))] 1685 impl Eq for TypeMacro {} 1686 #[cfg(any(feature = "derive", feature = "full"))] 1687 impl PartialEq for TypeMacro { eq(&self, other: &Self) -> bool1688 fn eq(&self, other: &Self) -> bool { 1689 self.mac == other.mac 1690 } 1691 } 1692 #[cfg(any(feature = "derive", feature = "full"))] 1693 impl Eq for TypeNever {} 1694 #[cfg(any(feature = "derive", feature = "full"))] 1695 impl PartialEq for TypeNever { eq(&self, _other: &Self) -> bool1696 fn eq(&self, _other: &Self) -> bool { 1697 true 1698 } 1699 } 1700 #[cfg(any(feature = "derive", feature = "full"))] 1701 impl Eq for TypeParam {} 1702 #[cfg(any(feature = "derive", feature = "full"))] 1703 impl PartialEq for TypeParam { eq(&self, other: &Self) -> bool1704 fn eq(&self, other: &Self) -> bool { 1705 self.attrs == other.attrs 1706 && self.ident == other.ident 1707 && self.colon_token == other.colon_token 1708 && self.bounds == other.bounds 1709 && self.eq_token == other.eq_token 1710 && self.default == other.default 1711 } 1712 } 1713 #[cfg(any(feature = "derive", feature = "full"))] 1714 impl Eq for TypeParamBound {} 1715 #[cfg(any(feature = "derive", feature = "full"))] 1716 impl PartialEq for TypeParamBound { eq(&self, other: &Self) -> bool1717 fn eq(&self, other: &Self) -> bool { 1718 match (self, other) { 1719 (TypeParamBound::Trait(self0), TypeParamBound::Trait(other0)) => self0 == other0, 1720 (TypeParamBound::Lifetime(self0), TypeParamBound::Lifetime(other0)) => self0 == other0, 1721 _ => false, 1722 } 1723 } 1724 } 1725 #[cfg(any(feature = "derive", feature = "full"))] 1726 impl Eq for TypeParen {} 1727 #[cfg(any(feature = "derive", feature = "full"))] 1728 impl PartialEq for TypeParen { eq(&self, other: &Self) -> bool1729 fn eq(&self, other: &Self) -> bool { 1730 self.elem == other.elem 1731 } 1732 } 1733 #[cfg(any(feature = "derive", feature = "full"))] 1734 impl Eq for TypePath {} 1735 #[cfg(any(feature = "derive", feature = "full"))] 1736 impl PartialEq for TypePath { eq(&self, other: &Self) -> bool1737 fn eq(&self, other: &Self) -> bool { 1738 self.qself == other.qself && self.path == other.path 1739 } 1740 } 1741 #[cfg(any(feature = "derive", feature = "full"))] 1742 impl Eq for TypePtr {} 1743 #[cfg(any(feature = "derive", feature = "full"))] 1744 impl PartialEq for TypePtr { eq(&self, other: &Self) -> bool1745 fn eq(&self, other: &Self) -> bool { 1746 self.const_token == other.const_token 1747 && self.mutability == other.mutability 1748 && self.elem == other.elem 1749 } 1750 } 1751 #[cfg(any(feature = "derive", feature = "full"))] 1752 impl Eq for TypeReference {} 1753 #[cfg(any(feature = "derive", feature = "full"))] 1754 impl PartialEq for TypeReference { eq(&self, other: &Self) -> bool1755 fn eq(&self, other: &Self) -> bool { 1756 self.lifetime == other.lifetime 1757 && self.mutability == other.mutability 1758 && self.elem == other.elem 1759 } 1760 } 1761 #[cfg(any(feature = "derive", feature = "full"))] 1762 impl Eq for TypeSlice {} 1763 #[cfg(any(feature = "derive", feature = "full"))] 1764 impl PartialEq for TypeSlice { eq(&self, other: &Self) -> bool1765 fn eq(&self, other: &Self) -> bool { 1766 self.elem == other.elem 1767 } 1768 } 1769 #[cfg(any(feature = "derive", feature = "full"))] 1770 impl Eq for TypeTraitObject {} 1771 #[cfg(any(feature = "derive", feature = "full"))] 1772 impl PartialEq for TypeTraitObject { eq(&self, other: &Self) -> bool1773 fn eq(&self, other: &Self) -> bool { 1774 self.dyn_token == other.dyn_token && self.bounds == other.bounds 1775 } 1776 } 1777 #[cfg(any(feature = "derive", feature = "full"))] 1778 impl Eq for TypeTuple {} 1779 #[cfg(any(feature = "derive", feature = "full"))] 1780 impl PartialEq for TypeTuple { eq(&self, other: &Self) -> bool1781 fn eq(&self, other: &Self) -> bool { 1782 self.elems == other.elems 1783 } 1784 } 1785 #[cfg(any(feature = "derive", feature = "full"))] 1786 impl Eq for UnOp {} 1787 #[cfg(any(feature = "derive", feature = "full"))] 1788 impl PartialEq for UnOp { eq(&self, other: &Self) -> bool1789 fn eq(&self, other: &Self) -> bool { 1790 match (self, other) { 1791 (UnOp::Deref(_), UnOp::Deref(_)) => true, 1792 (UnOp::Not(_), UnOp::Not(_)) => true, 1793 (UnOp::Neg(_), UnOp::Neg(_)) => true, 1794 _ => false, 1795 } 1796 } 1797 } 1798 #[cfg(feature = "full")] 1799 impl Eq for UseGlob {} 1800 #[cfg(feature = "full")] 1801 impl PartialEq for UseGlob { eq(&self, _other: &Self) -> bool1802 fn eq(&self, _other: &Self) -> bool { 1803 true 1804 } 1805 } 1806 #[cfg(feature = "full")] 1807 impl Eq for UseGroup {} 1808 #[cfg(feature = "full")] 1809 impl PartialEq for UseGroup { eq(&self, other: &Self) -> bool1810 fn eq(&self, other: &Self) -> bool { 1811 self.items == other.items 1812 } 1813 } 1814 #[cfg(feature = "full")] 1815 impl Eq for UseName {} 1816 #[cfg(feature = "full")] 1817 impl PartialEq for UseName { eq(&self, other: &Self) -> bool1818 fn eq(&self, other: &Self) -> bool { 1819 self.ident == other.ident 1820 } 1821 } 1822 #[cfg(feature = "full")] 1823 impl Eq for UsePath {} 1824 #[cfg(feature = "full")] 1825 impl PartialEq for UsePath { eq(&self, other: &Self) -> bool1826 fn eq(&self, other: &Self) -> bool { 1827 self.ident == other.ident && self.tree == other.tree 1828 } 1829 } 1830 #[cfg(feature = "full")] 1831 impl Eq for UseRename {} 1832 #[cfg(feature = "full")] 1833 impl PartialEq for UseRename { eq(&self, other: &Self) -> bool1834 fn eq(&self, other: &Self) -> bool { 1835 self.ident == other.ident && self.rename == other.rename 1836 } 1837 } 1838 #[cfg(feature = "full")] 1839 impl Eq for UseTree {} 1840 #[cfg(feature = "full")] 1841 impl PartialEq for UseTree { eq(&self, other: &Self) -> bool1842 fn eq(&self, other: &Self) -> bool { 1843 match (self, other) { 1844 (UseTree::Path(self0), UseTree::Path(other0)) => self0 == other0, 1845 (UseTree::Name(self0), UseTree::Name(other0)) => self0 == other0, 1846 (UseTree::Rename(self0), UseTree::Rename(other0)) => self0 == other0, 1847 (UseTree::Glob(self0), UseTree::Glob(other0)) => self0 == other0, 1848 (UseTree::Group(self0), UseTree::Group(other0)) => self0 == other0, 1849 _ => false, 1850 } 1851 } 1852 } 1853 #[cfg(any(feature = "derive", feature = "full"))] 1854 impl Eq for Variadic {} 1855 #[cfg(any(feature = "derive", feature = "full"))] 1856 impl PartialEq for Variadic { eq(&self, other: &Self) -> bool1857 fn eq(&self, other: &Self) -> bool { 1858 self.attrs == other.attrs 1859 } 1860 } 1861 #[cfg(any(feature = "derive", feature = "full"))] 1862 impl Eq for Variant {} 1863 #[cfg(any(feature = "derive", feature = "full"))] 1864 impl PartialEq for Variant { eq(&self, other: &Self) -> bool1865 fn eq(&self, other: &Self) -> bool { 1866 self.attrs == other.attrs 1867 && self.ident == other.ident 1868 && self.fields == other.fields 1869 && self.discriminant == other.discriminant 1870 } 1871 } 1872 #[cfg(any(feature = "derive", feature = "full"))] 1873 impl Eq for VisCrate {} 1874 #[cfg(any(feature = "derive", feature = "full"))] 1875 impl PartialEq for VisCrate { eq(&self, _other: &Self) -> bool1876 fn eq(&self, _other: &Self) -> bool { 1877 true 1878 } 1879 } 1880 #[cfg(any(feature = "derive", feature = "full"))] 1881 impl Eq for VisPublic {} 1882 #[cfg(any(feature = "derive", feature = "full"))] 1883 impl PartialEq for VisPublic { eq(&self, _other: &Self) -> bool1884 fn eq(&self, _other: &Self) -> bool { 1885 true 1886 } 1887 } 1888 #[cfg(any(feature = "derive", feature = "full"))] 1889 impl Eq for VisRestricted {} 1890 #[cfg(any(feature = "derive", feature = "full"))] 1891 impl PartialEq for VisRestricted { eq(&self, other: &Self) -> bool1892 fn eq(&self, other: &Self) -> bool { 1893 self.in_token == other.in_token && self.path == other.path 1894 } 1895 } 1896 #[cfg(any(feature = "derive", feature = "full"))] 1897 impl Eq for Visibility {} 1898 #[cfg(any(feature = "derive", feature = "full"))] 1899 impl PartialEq for Visibility { eq(&self, other: &Self) -> bool1900 fn eq(&self, other: &Self) -> bool { 1901 match (self, other) { 1902 (Visibility::Public(self0), Visibility::Public(other0)) => self0 == other0, 1903 (Visibility::Crate(self0), Visibility::Crate(other0)) => self0 == other0, 1904 (Visibility::Restricted(self0), Visibility::Restricted(other0)) => self0 == other0, 1905 (Visibility::Inherited, Visibility::Inherited) => true, 1906 _ => false, 1907 } 1908 } 1909 } 1910 #[cfg(any(feature = "derive", feature = "full"))] 1911 impl Eq for WhereClause {} 1912 #[cfg(any(feature = "derive", feature = "full"))] 1913 impl PartialEq for WhereClause { eq(&self, other: &Self) -> bool1914 fn eq(&self, other: &Self) -> bool { 1915 self.predicates == other.predicates 1916 } 1917 } 1918 #[cfg(any(feature = "derive", feature = "full"))] 1919 impl Eq for WherePredicate {} 1920 #[cfg(any(feature = "derive", feature = "full"))] 1921 impl PartialEq for WherePredicate { eq(&self, other: &Self) -> bool1922 fn eq(&self, other: &Self) -> bool { 1923 match (self, other) { 1924 (WherePredicate::Type(self0), WherePredicate::Type(other0)) => self0 == other0, 1925 (WherePredicate::Lifetime(self0), WherePredicate::Lifetime(other0)) => self0 == other0, 1926 (WherePredicate::Eq(self0), WherePredicate::Eq(other0)) => self0 == other0, 1927 _ => false, 1928 } 1929 } 1930 } 1931