eq.rs 91 KB

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