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