From 9ba2b0e3a3fde904d0001708869b1632858bc883 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Sat, 19 Oct 2024 19:50:12 +0000 Subject: [PATCH] refactor(ast_tools): move `#[allow]` attrs to top of generated files (#6679) Follow-on after #6404. Shorten generated code for `impl Serialize` by moving `#[allow]` attrs to top of file. --- crates/oxc_ast/src/generated/derive_estree.rs | 241 +----------------- .../src/generated/derive_estree.rs | 30 +-- .../oxc_span/src/generated/derive_estree.rs | 8 +- .../oxc_syntax/src/generated/derive_estree.rs | 8 +- tasks/ast_tools/src/derives/estree.rs | 5 +- 5 files changed, 11 insertions(+), 281 deletions(-) diff --git a/crates/oxc_ast/src/generated/derive_estree.rs b/crates/oxc_ast/src/generated/derive_estree.rs index 9f02df61c9022..ebdc598b2c35f 100644 --- a/crates/oxc_ast/src/generated/derive_estree.rs +++ b/crates/oxc_ast/src/generated/derive_estree.rs @@ -1,7 +1,8 @@ // Auto-generated code, DO NOT EDIT DIRECTLY! // To edit this generated file you have to edit `tasks/ast_tools/src/derives/estree.rs` -#[allow(unused_imports)] +#![allow(unused_imports, unused_mut, clippy::match_same_arms)] + use serde::{ser::SerializeMap, Serialize, Serializer}; #[allow(clippy::wildcard_imports)] @@ -17,7 +18,6 @@ use crate::ast::literal::*; use crate::ast::ts::*; impl Serialize for BooleanLiteral { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -34,7 +34,6 @@ const TS_APPEND_CONTENT: &'static str = "export type BooleanLiteral = ({\n\ttype: 'BooleanLiteral';\n\tvalue: boolean;\n}) & Span;"; impl Serialize for NullLiteral { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -50,7 +49,6 @@ const TS_APPEND_CONTENT: &'static str = "export type NullLiteral = ({\n\ttype: 'NullLiteral';\n}) & Span;"; impl<'a> Serialize for NumericLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -67,7 +65,6 @@ impl<'a> Serialize for NumericLiteral<'a> { const TS_APPEND_CONTENT: &'static str = "export type NumericLiteral = ({\n\ttype: 'NumericLiteral';\n\tvalue: number;\n\traw: string;\n}) & Span;"; impl<'a> Serialize for BigIntLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -84,7 +81,6 @@ const TS_APPEND_CONTENT: &'static str = "export type BigIntLiteral = ({\n\ttype: 'BigIntLiteral';\n\traw: string;\n}) & Span;"; impl<'a> Serialize for RegExpLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -101,7 +97,6 @@ impl<'a> Serialize for RegExpLiteral<'a> { const TS_APPEND_CONTENT: &'static str = "export type RegExpLiteral = ({\n\ttype: 'RegExpLiteral';\n\tvalue: EmptyObject;\n\tregex: RegExp;\n}) & Span;"; impl<'a> Serialize for RegExp<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -117,7 +112,6 @@ const TS_APPEND_CONTENT: &'static str = "export type RegExp = ({\n\tpattern: RegExpPattern;\n\tflags: RegExpFlags;\n});"; impl<'a> Serialize for RegExpPattern<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -133,7 +127,6 @@ impl<'a> Serialize for RegExpPattern<'a> { const TS_APPEND_CONTENT: &'static str = "export type RegExpPattern = string | string | Pattern;"; impl Serialize for EmptyObject { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -146,7 +139,6 @@ impl Serialize for EmptyObject { const TS_APPEND_CONTENT: &'static str = "export type EmptyObject = ({\n});"; impl<'a> Serialize for StringLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -163,7 +155,6 @@ const TS_APPEND_CONTENT: &'static str = "export type StringLiteral = ({\n\ttype: 'StringLiteral';\n\tvalue: string;\n}) & Span;"; impl<'a> Serialize for Program<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -182,7 +173,6 @@ impl<'a> Serialize for Program<'a> { const TS_APPEND_CONTENT: &'static str = "export type Program = ({\n\ttype: 'Program';\n\tsourceType: SourceType;\n\thashbang: (Hashbang) | null;\n\tdirectives: Array;\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for Expression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -237,7 +227,6 @@ impl<'a> Serialize for Expression<'a> { const TS_APPEND_CONTENT: &'static str = "export type Expression = BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for IdentifierName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -254,7 +243,6 @@ const TS_APPEND_CONTENT: &'static str = "export type IdentifierName = ({\n\ttype: 'Identifier';\n\tname: string;\n}) & Span;"; impl<'a> Serialize for IdentifierReference<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -271,7 +259,6 @@ const TS_APPEND_CONTENT: &'static str = "export type IdentifierReference = ({\n\ttype: 'Identifier';\n\tname: string;\n}) & Span;"; impl<'a> Serialize for BindingIdentifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -288,7 +275,6 @@ const TS_APPEND_CONTENT: &'static str = "export type BindingIdentifier = ({\n\ttype: 'Identifier';\n\tname: string;\n}) & Span;"; impl<'a> Serialize for LabelIdentifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -305,7 +291,6 @@ const TS_APPEND_CONTENT: &'static str = "export type LabelIdentifier = ({\n\ttype: 'Identifier';\n\tname: string;\n}) & Span;"; impl Serialize for ThisExpression { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -321,7 +306,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ThisExpression = ({\n\ttype: 'ThisExpression';\n}) & Span;"; impl<'a> Serialize for ArrayExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -337,7 +321,6 @@ impl<'a> Serialize for ArrayExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ArrayExpression = ({\n\ttype: 'ArrayExpression';\n\telements: Array;\n}) & Span;"; impl<'a> Serialize for ArrayExpressionElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -408,7 +391,6 @@ impl<'a> Serialize for ArrayExpressionElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ArrayExpressionElement = SpreadElement | Elision | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for ObjectExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -424,7 +406,6 @@ impl<'a> Serialize for ObjectExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ObjectExpression = ({\n\ttype: 'ObjectExpression';\n\tproperties: Array;\n}) & Span;"; impl<'a> Serialize for ObjectPropertyKind<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -440,7 +421,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ObjectPropertyKind = ObjectProperty | SpreadElement;"; impl<'a> Serialize for ObjectProperty<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -462,7 +442,6 @@ impl<'a> Serialize for ObjectProperty<'a> { const TS_APPEND_CONTENT: &'static str = "export type ObjectProperty = ({\n\ttype: 'ObjectProperty';\n\tkind: PropertyKind;\n\tkey: PropertyKey;\n\tvalue: Expression;\n\tinit: (Expression) | null;\n\tmethod: boolean;\n\tshorthand: boolean;\n\tcomputed: boolean;\n}) & Span;"; impl<'a> Serialize for PropertyKey<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -519,7 +498,6 @@ impl<'a> Serialize for PropertyKey<'a> { const TS_APPEND_CONTENT: &'static str = "export type PropertyKey = IdentifierName | PrivateIdentifier | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl Serialize for PropertyKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -535,7 +513,6 @@ impl Serialize for PropertyKind { const TS_APPEND_CONTENT: &'static str = "export type PropertyKind = 'init' | 'get' | 'set';"; impl<'a> Serialize for TemplateLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -552,7 +529,6 @@ impl<'a> Serialize for TemplateLiteral<'a> { const TS_APPEND_CONTENT: &'static str = "export type TemplateLiteral = ({\n\ttype: 'TemplateLiteral';\n\tquasis: Array;\n\texpressions: Array;\n}) & Span;"; impl<'a> Serialize for TaggedTemplateExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -570,7 +546,6 @@ impl<'a> Serialize for TaggedTemplateExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type TaggedTemplateExpression = ({\n\ttype: 'TaggedTemplateExpression';\n\ttag: Expression;\n\tquasi: TemplateLiteral;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for TemplateElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -587,7 +562,6 @@ impl<'a> Serialize for TemplateElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type TemplateElement = ({\n\ttype: 'TemplateElement';\n\ttail: boolean;\n\tvalue: TemplateElementValue;\n}) & Span;"; impl<'a> Serialize for TemplateElementValue<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -603,7 +577,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TemplateElementValue = ({\n\traw: string;\n\tcooked: (string) | null;\n});"; impl<'a> Serialize for MemberExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -619,7 +592,6 @@ impl<'a> Serialize for MemberExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type MemberExpression = ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for ComputedMemberExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -637,7 +609,6 @@ impl<'a> Serialize for ComputedMemberExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ComputedMemberExpression = ({\n\ttype: 'ComputedMemberExpression';\n\tobject: Expression;\n\texpression: Expression;\n\toptional: boolean;\n}) & Span;"; impl<'a> Serialize for StaticMemberExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -655,7 +626,6 @@ impl<'a> Serialize for StaticMemberExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type StaticMemberExpression = ({\n\ttype: 'StaticMemberExpression';\n\tobject: Expression;\n\tproperty: IdentifierName;\n\toptional: boolean;\n}) & Span;"; impl<'a> Serialize for PrivateFieldExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -673,7 +643,6 @@ impl<'a> Serialize for PrivateFieldExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type PrivateFieldExpression = ({\n\ttype: 'PrivateFieldExpression';\n\tobject: Expression;\n\tfield: PrivateIdentifier;\n\toptional: boolean;\n}) & Span;"; impl<'a> Serialize for CallExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -692,7 +661,6 @@ impl<'a> Serialize for CallExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type CallExpression = ({\n\ttype: 'CallExpression';\n\tcallee: Expression;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n\targuments: Array;\n\toptional: boolean;\n}) & Span;"; impl<'a> Serialize for NewExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -710,7 +678,6 @@ impl<'a> Serialize for NewExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type NewExpression = ({\n\ttype: 'NewExpression';\n\tcallee: Expression;\n\targuments: Array;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for MetaProperty<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -727,7 +694,6 @@ impl<'a> Serialize for MetaProperty<'a> { const TS_APPEND_CONTENT: &'static str = "export type MetaProperty = ({\n\ttype: 'MetaProperty';\n\tmeta: IdentifierName;\n\tproperty: IdentifierName;\n}) & Span;"; impl<'a> Serialize for SpreadElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -744,7 +710,6 @@ const TS_APPEND_CONTENT: &'static str = "export type SpreadElement = ({\n\ttype: 'SpreadElement';\n\targument: Expression;\n}) & Span;"; impl<'a> Serialize for Argument<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -800,7 +765,6 @@ impl<'a> Serialize for Argument<'a> { const TS_APPEND_CONTENT: &'static str = "export type Argument = SpreadElement | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for UpdateExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -818,7 +782,6 @@ impl<'a> Serialize for UpdateExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type UpdateExpression = ({\n\ttype: 'UpdateExpression';\n\toperator: UpdateOperator;\n\tprefix: boolean;\n\targument: SimpleAssignmentTarget;\n}) & Span;"; impl<'a> Serialize for UnaryExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -835,7 +798,6 @@ impl<'a> Serialize for UnaryExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type UnaryExpression = ({\n\ttype: 'UnaryExpression';\n\toperator: UnaryOperator;\n\targument: Expression;\n}) & Span;"; impl<'a> Serialize for BinaryExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -853,7 +815,6 @@ impl<'a> Serialize for BinaryExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type BinaryExpression = ({\n\ttype: 'BinaryExpression';\n\tleft: Expression;\n\toperator: BinaryOperator;\n\tright: Expression;\n}) & Span;"; impl<'a> Serialize for PrivateInExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -871,7 +832,6 @@ impl<'a> Serialize for PrivateInExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type PrivateInExpression = ({\n\ttype: 'PrivateInExpression';\n\tleft: PrivateIdentifier;\n\toperator: BinaryOperator;\n\tright: Expression;\n}) & Span;"; impl<'a> Serialize for LogicalExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -889,7 +849,6 @@ impl<'a> Serialize for LogicalExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type LogicalExpression = ({\n\ttype: 'LogicalExpression';\n\tleft: Expression;\n\toperator: LogicalOperator;\n\tright: Expression;\n}) & Span;"; impl<'a> Serialize for ConditionalExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -907,7 +866,6 @@ impl<'a> Serialize for ConditionalExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ConditionalExpression = ({\n\ttype: 'ConditionalExpression';\n\ttest: Expression;\n\tconsequent: Expression;\n\talternate: Expression;\n}) & Span;"; impl<'a> Serialize for AssignmentExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -925,7 +883,6 @@ impl<'a> Serialize for AssignmentExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentExpression = ({\n\ttype: 'AssignmentExpression';\n\toperator: AssignmentOperator;\n\tleft: AssignmentTarget;\n\tright: Expression;\n}) & Span;"; impl<'a> Serialize for AssignmentTarget<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -949,7 +906,6 @@ impl<'a> Serialize for AssignmentTarget<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTarget = IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | ArrayAssignmentTarget | ObjectAssignmentTarget;"; impl<'a> Serialize for SimpleAssignmentTarget<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -981,7 +937,6 @@ impl<'a> Serialize for SimpleAssignmentTarget<'a> { const TS_APPEND_CONTENT: &'static str = "export type SimpleAssignmentTarget = IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for AssignmentTargetPattern<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1007,7 +962,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ArrayAssignmentTarget = ({\ const TS_APPEND_CONTENT: &'static str = "export type ObjectAssignmentTarget = ({\n\ttype: 'ObjectAssignmentTarget';\n\tproperties: Array;\n}) & Span;"; impl<'a> Serialize for AssignmentTargetRest<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1023,7 +977,6 @@ impl<'a> Serialize for AssignmentTargetRest<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTargetRest = ({\n\ttype: 'RestElement';\n\targument: AssignmentTarget;\n}) & Span;"; impl<'a> Serialize for AssignmentTargetMaybeDefault<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1068,7 +1021,6 @@ impl<'a> Serialize for AssignmentTargetMaybeDefault<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | ArrayAssignmentTarget | ObjectAssignmentTarget;"; impl<'a> Serialize for AssignmentTargetWithDefault<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1085,7 +1037,6 @@ impl<'a> Serialize for AssignmentTargetWithDefault<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTargetWithDefault = ({\n\ttype: 'AssignmentTargetWithDefault';\n\tbinding: AssignmentTarget;\n\tinit: Expression;\n}) & Span;"; impl<'a> Serialize for AssignmentTargetProperty<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1104,7 +1055,6 @@ impl<'a> Serialize for AssignmentTargetProperty<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTargetProperty = AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty;"; impl<'a> Serialize for AssignmentTargetPropertyIdentifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1121,7 +1071,6 @@ impl<'a> Serialize for AssignmentTargetPropertyIdentifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTargetPropertyIdentifier = ({\n\ttype: 'AssignmentTargetPropertyIdentifier';\n\tbinding: IdentifierReference;\n\tinit: (Expression) | null;\n}) & Span;"; impl<'a> Serialize for AssignmentTargetPropertyProperty<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1138,7 +1087,6 @@ impl<'a> Serialize for AssignmentTargetPropertyProperty<'a> { const TS_APPEND_CONTENT: &'static str = "export type AssignmentTargetPropertyProperty = ({\n\ttype: 'AssignmentTargetPropertyProperty';\n\tname: PropertyKey;\n\tbinding: AssignmentTargetMaybeDefault;\n}) & Span;"; impl<'a> Serialize for SequenceExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1154,7 +1102,6 @@ impl<'a> Serialize for SequenceExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type SequenceExpression = ({\n\ttype: 'SequenceExpression';\n\texpressions: Array;\n}) & Span;"; impl Serialize for Super { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1169,7 +1116,6 @@ impl Serialize for Super { const TS_APPEND_CONTENT: &'static str = "export type Super = ({\n\ttype: 'Super';\n}) & Span;"; impl<'a> Serialize for AwaitExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1185,7 +1131,6 @@ impl<'a> Serialize for AwaitExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type AwaitExpression = ({\n\ttype: 'AwaitExpression';\n\targument: Expression;\n}) & Span;"; impl<'a> Serialize for ChainExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1201,7 +1146,6 @@ impl<'a> Serialize for ChainExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ChainExpression = ({\n\ttype: 'ChainExpression';\n\texpression: ChainElement;\n}) & Span;"; impl<'a> Serialize for ChainElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1218,7 +1162,6 @@ impl<'a> Serialize for ChainElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ChainElement = CallExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for ParenthesizedExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1234,7 +1177,6 @@ impl<'a> Serialize for ParenthesizedExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ParenthesizedExpression = ({\n\ttype: 'ParenthesizedExpression';\n\texpression: Expression;\n}) & Span;"; impl<'a> Serialize for Statement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1279,7 +1221,6 @@ impl<'a> Serialize for Statement<'a> { const TS_APPEND_CONTENT: &'static str = "export type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | WithStatement | VariableDeclaration | Function | Class | TSTypeAliasDeclaration | TSInterfaceDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | ImportDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;"; impl<'a> Serialize for Directive<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1296,7 +1237,6 @@ impl<'a> Serialize for Directive<'a> { const TS_APPEND_CONTENT: &'static str = "export type Directive = ({\n\ttype: 'Directive';\n\texpression: StringLiteral;\n\tdirective: string;\n}) & Span;"; impl<'a> Serialize for Hashbang<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1313,7 +1253,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Hashbang = ({\n\ttype: 'Hashbang';\n\tvalue: string;\n}) & Span;"; impl<'a> Serialize for BlockStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1329,7 +1268,6 @@ impl<'a> Serialize for BlockStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type BlockStatement = ({\n\ttype: 'BlockStatement';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for Declaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1350,7 +1288,6 @@ impl<'a> Serialize for Declaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type Declaration = VariableDeclaration | Function | Class | TSTypeAliasDeclaration | TSInterfaceDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration;"; impl<'a> Serialize for VariableDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1368,7 +1305,6 @@ impl<'a> Serialize for VariableDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type VariableDeclaration = ({\n\ttype: 'VariableDeclaration';\n\tkind: VariableDeclarationKind;\n\tdeclarations: Array;\n\tdeclare: boolean;\n}) & Span;"; impl Serialize for VariableDeclarationKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1397,7 +1333,6 @@ const TS_APPEND_CONTENT: &'static str = "export type VariableDeclarationKind = 'var' | 'const' | 'let' | 'using' | 'await using';"; impl<'a> Serialize for VariableDeclarator<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1415,7 +1350,6 @@ impl<'a> Serialize for VariableDeclarator<'a> { const TS_APPEND_CONTENT: &'static str = "export type VariableDeclarator = ({\n\ttype: 'VariableDeclarator';\n\tid: BindingPattern;\n\tinit: (Expression) | null;\n\tdefinite: boolean;\n}) & Span;"; impl Serialize for EmptyStatement { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1431,7 +1365,6 @@ const TS_APPEND_CONTENT: &'static str = "export type EmptyStatement = ({\n\ttype: 'EmptyStatement';\n}) & Span;"; impl<'a> Serialize for ExpressionStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1447,7 +1380,6 @@ impl<'a> Serialize for ExpressionStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ExpressionStatement = ({\n\ttype: 'ExpressionStatement';\n\texpression: Expression;\n}) & Span;"; impl<'a> Serialize for IfStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1465,7 +1397,6 @@ impl<'a> Serialize for IfStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type IfStatement = ({\n\ttype: 'IfStatement';\n\ttest: Expression;\n\tconsequent: Statement;\n\talternate: (Statement) | null;\n}) & Span;"; impl<'a> Serialize for DoWhileStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1482,7 +1413,6 @@ impl<'a> Serialize for DoWhileStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type DoWhileStatement = ({\n\ttype: 'DoWhileStatement';\n\tbody: Statement;\n\ttest: Expression;\n}) & Span;"; impl<'a> Serialize for WhileStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1499,7 +1429,6 @@ impl<'a> Serialize for WhileStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type WhileStatement = ({\n\ttype: 'WhileStatement';\n\ttest: Expression;\n\tbody: Statement;\n}) & Span;"; impl<'a> Serialize for ForStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1518,7 +1447,6 @@ impl<'a> Serialize for ForStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ForStatement = ({\n\ttype: 'ForStatement';\n\tinit: (ForStatementInit) | null;\n\ttest: (Expression) | null;\n\tupdate: (Expression) | null;\n\tbody: Statement;\n}) & Span;"; impl<'a> Serialize for ForStatementInit<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1574,7 +1502,6 @@ impl<'a> Serialize for ForStatementInit<'a> { const TS_APPEND_CONTENT: &'static str = "export type ForStatementInit = VariableDeclaration | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for ForInStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1592,7 +1519,6 @@ impl<'a> Serialize for ForInStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ForInStatement = ({\n\ttype: 'ForInStatement';\n\tleft: ForStatementLeft;\n\tright: Expression;\n\tbody: Statement;\n}) & Span;"; impl<'a> Serialize for ForStatementLeft<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1617,7 +1543,6 @@ impl<'a> Serialize for ForStatementLeft<'a> { const TS_APPEND_CONTENT: &'static str = "export type ForStatementLeft = VariableDeclaration | IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | ArrayAssignmentTarget | ObjectAssignmentTarget;"; impl<'a> Serialize for ForOfStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1636,7 +1561,6 @@ impl<'a> Serialize for ForOfStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ForOfStatement = ({\n\ttype: 'ForOfStatement';\n\tawait: boolean;\n\tleft: ForStatementLeft;\n\tright: Expression;\n\tbody: Statement;\n}) & Span;"; impl<'a> Serialize for ContinueStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1652,7 +1576,6 @@ impl<'a> Serialize for ContinueStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ContinueStatement = ({\n\ttype: 'ContinueStatement';\n\tlabel: (LabelIdentifier) | null;\n}) & Span;"; impl<'a> Serialize for BreakStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1668,7 +1591,6 @@ impl<'a> Serialize for BreakStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type BreakStatement = ({\n\ttype: 'BreakStatement';\n\tlabel: (LabelIdentifier) | null;\n}) & Span;"; impl<'a> Serialize for ReturnStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1684,7 +1606,6 @@ impl<'a> Serialize for ReturnStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ReturnStatement = ({\n\ttype: 'ReturnStatement';\n\targument: (Expression) | null;\n}) & Span;"; impl<'a> Serialize for WithStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1701,7 +1622,6 @@ impl<'a> Serialize for WithStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type WithStatement = ({\n\ttype: 'WithStatement';\n\tobject: Expression;\n\tbody: Statement;\n}) & Span;"; impl<'a> Serialize for SwitchStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1718,7 +1638,6 @@ impl<'a> Serialize for SwitchStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type SwitchStatement = ({\n\ttype: 'SwitchStatement';\n\tdiscriminant: Expression;\n\tcases: Array;\n}) & Span;"; impl<'a> Serialize for SwitchCase<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1735,7 +1654,6 @@ impl<'a> Serialize for SwitchCase<'a> { const TS_APPEND_CONTENT: &'static str = "export type SwitchCase = ({\n\ttype: 'SwitchCase';\n\ttest: (Expression) | null;\n\tconsequent: Array;\n}) & Span;"; impl<'a> Serialize for LabeledStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1752,7 +1670,6 @@ impl<'a> Serialize for LabeledStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type LabeledStatement = ({\n\ttype: 'LabeledStatement';\n\tlabel: LabelIdentifier;\n\tbody: Statement;\n}) & Span;"; impl<'a> Serialize for ThrowStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1768,7 +1685,6 @@ impl<'a> Serialize for ThrowStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ThrowStatement = ({\n\ttype: 'ThrowStatement';\n\targument: Expression;\n}) & Span;"; impl<'a> Serialize for TryStatement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1786,7 +1702,6 @@ impl<'a> Serialize for TryStatement<'a> { const TS_APPEND_CONTENT: &'static str = "export type TryStatement = ({\n\ttype: 'TryStatement';\n\tblock: BlockStatement;\n\thandler: (CatchClause) | null;\n\tfinalizer: (BlockStatement) | null;\n}) & Span;"; impl<'a> Serialize for CatchClause<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1803,7 +1718,6 @@ impl<'a> Serialize for CatchClause<'a> { const TS_APPEND_CONTENT: &'static str = "export type CatchClause = ({\n\ttype: 'CatchClause';\n\tparam: (CatchParameter) | null;\n\tbody: BlockStatement;\n}) & Span;"; impl<'a> Serialize for CatchParameter<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1819,7 +1733,6 @@ impl<'a> Serialize for CatchParameter<'a> { const TS_APPEND_CONTENT: &'static str = "export type CatchParameter = ({\n\ttype: 'CatchParameter';\n\tpattern: BindingPattern;\n}) & Span;"; impl Serialize for DebuggerStatement { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1835,7 +1748,6 @@ const TS_APPEND_CONTENT: &'static str = "export type DebuggerStatement = ({\n\ttype: 'DebuggerStatement';\n}) & Span;"; impl<'a> Serialize for BindingPattern<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1851,7 +1763,6 @@ impl<'a> Serialize for BindingPattern<'a> { const TS_APPEND_CONTENT: &'static str = "export type BindingPattern = ({\n\ttypeAnnotation: (TSTypeAnnotation) | null;\n\toptional: boolean;\n}) & (BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern);"; impl<'a> Serialize for BindingPatternKind<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1868,7 +1779,6 @@ impl<'a> Serialize for BindingPatternKind<'a> { const TS_APPEND_CONTENT: &'static str = "export type BindingPatternKind = BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern;"; impl<'a> Serialize for AssignmentPattern<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1888,7 +1798,6 @@ const TS_APPEND_CONTENT: &'static str = "export type AssignmentPattern = ({\n\tt const TS_APPEND_CONTENT: &'static str = "export type ObjectPattern = ({\n\ttype: 'ObjectPattern';\n\tproperties: Array;\n}) & Span;"; impl<'a> Serialize for BindingProperty<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1910,7 +1819,6 @@ const TS_APPEND_CONTENT: &'static str = "export type BindingProperty = ({\n\ttyp const TS_APPEND_CONTENT: &'static str = "export type ArrayPattern = ({\n\ttype: 'ArrayPattern';\n\telements: Array;\n}) & Span;"; impl<'a> Serialize for BindingRestElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1926,7 +1834,6 @@ impl<'a> Serialize for BindingRestElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type BindingRestElement = ({\n\ttype: 'RestElement';\n\targument: BindingPattern;\n}) & Span;"; impl<'a> Serialize for Function<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1950,7 +1857,6 @@ impl<'a> Serialize for Function<'a> { const TS_APPEND_CONTENT: &'static str = "export type Function = ({\n\ttype: FunctionType;\n\tid: (BindingIdentifier) | null;\n\tgenerator: boolean;\n\tasync: boolean;\n\tdeclare: boolean;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tthisParam: (TSThisParameter) | null;\n\tparams: FormalParameters;\n\treturnType: (TSTypeAnnotation) | null;\n\tbody: (FunctionBody) | null;\n}) & Span;"; impl Serialize for FunctionType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -1980,7 +1886,6 @@ const TS_APPEND_CONTENT: &'static str = "export type FunctionType = 'FunctionDec const TS_APPEND_CONTENT: &'static str = "export type FormalParameters = ({\n\ttype: 'FormalParameters';\n\tkind: FormalParameterKind;\n\titems: Array;\n}) & Span;"; impl<'a> Serialize for FormalParameter<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2000,7 +1905,6 @@ impl<'a> Serialize for FormalParameter<'a> { const TS_APPEND_CONTENT: &'static str = "export type FormalParameter = ({\n\ttype: 'FormalParameter';\n\tdecorators: Array;\n\tpattern: BindingPattern;\n\taccessibility: (TSAccessibility) | null;\n\treadonly: boolean;\n\toverride: boolean;\n}) & Span;"; impl Serialize for FormalParameterKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2029,7 +1933,6 @@ impl Serialize for FormalParameterKind { const TS_APPEND_CONTENT: &'static str = "export type FormalParameterKind = 'FormalParameter' | 'UniqueFormalParameters' | 'ArrowFormalParameters' | 'Signature';"; impl<'a> Serialize for FunctionBody<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2046,7 +1949,6 @@ impl<'a> Serialize for FunctionBody<'a> { const TS_APPEND_CONTENT: &'static str = "export type FunctionBody = ({\n\ttype: 'FunctionBody';\n\tdirectives: Array;\n\tstatements: Array;\n}) & Span;"; impl<'a> Serialize for ArrowFunctionExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2067,7 +1969,6 @@ impl<'a> Serialize for ArrowFunctionExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ArrowFunctionExpression = ({\n\ttype: 'ArrowFunctionExpression';\n\texpression: boolean;\n\tasync: boolean;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tparams: FormalParameters;\n\treturnType: (TSTypeAnnotation) | null;\n\tbody: FunctionBody;\n}) & Span;"; impl<'a> Serialize for YieldExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2084,7 +1985,6 @@ impl<'a> Serialize for YieldExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type YieldExpression = ({\n\ttype: 'YieldExpression';\n\tdelegate: boolean;\n\targument: (Expression) | null;\n}) & Span;"; impl<'a> Serialize for Class<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2108,7 +2008,6 @@ impl<'a> Serialize for Class<'a> { const TS_APPEND_CONTENT: &'static str = "export type Class = ({\n\ttype: ClassType;\n\tdecorators: Array;\n\tid: (BindingIdentifier) | null;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tsuperClass: (Expression) | null;\n\tsuperTypeParameters: (TSTypeParameterInstantiation) | null;\n\timplements: (Array) | null;\n\tbody: ClassBody;\n\tabstract: boolean;\n\tdeclare: boolean;\n}) & Span;"; impl Serialize for ClassType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2128,7 +2027,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ClassType = 'ClassDeclaration' | 'ClassExpression';"; impl<'a> Serialize for ClassBody<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2145,7 +2043,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ClassBody = ({\n\ttype: 'ClassBody';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for ClassElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2163,7 +2060,6 @@ impl<'a> Serialize for ClassElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type ClassElement = StaticBlock | MethodDefinition | PropertyDefinition | AccessorProperty | TSIndexSignature;"; impl<'a> Serialize for MethodDefinition<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2187,7 +2083,6 @@ impl<'a> Serialize for MethodDefinition<'a> { const TS_APPEND_CONTENT: &'static str = "export type MethodDefinition = ({\n\ttype: MethodDefinitionType;\n\tdecorators: Array;\n\tkey: PropertyKey;\n\tvalue: Function;\n\tkind: MethodDefinitionKind;\n\tcomputed: boolean;\n\tstatic: boolean;\n\toverride: boolean;\n\toptional: boolean;\n\taccessibility: (TSAccessibility) | null;\n}) & Span;"; impl Serialize for MethodDefinitionType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2209,7 +2104,6 @@ const TS_APPEND_CONTENT: &'static str = "export type MethodDefinitionType = 'MethodDefinition' | 'TSAbstractMethodDefinition';"; impl<'a> Serialize for PropertyDefinition<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2236,7 +2130,6 @@ impl<'a> Serialize for PropertyDefinition<'a> { const TS_APPEND_CONTENT: &'static str = "export type PropertyDefinition = ({\n\ttype: PropertyDefinitionType;\n\tdecorators: Array;\n\tkey: PropertyKey;\n\tvalue: (Expression) | null;\n\tcomputed: boolean;\n\tstatic: boolean;\n\tdeclare: boolean;\n\toverride: boolean;\n\toptional: boolean;\n\tdefinite: boolean;\n\treadonly: boolean;\n\ttypeAnnotation: (TSTypeAnnotation) | null;\n\taccessibility: (TSAccessibility) | null;\n}) & Span;"; impl Serialize for PropertyDefinitionType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2261,7 +2154,6 @@ const TS_APPEND_CONTENT: &'static str = "export type PropertyDefinitionType = 'PropertyDefinition' | 'TSAbstractPropertyDefinition';"; impl Serialize for MethodDefinitionKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2287,7 +2179,6 @@ const TS_APPEND_CONTENT: &'static str = "export type MethodDefinitionKind = 'constructor' | 'method' | 'get' | 'set';"; impl<'a> Serialize for PrivateIdentifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2304,7 +2195,6 @@ const TS_APPEND_CONTENT: &'static str = "export type PrivateIdentifier = ({\n\ttype: 'PrivateIdentifier';\n\tname: string;\n}) & Span;"; impl<'a> Serialize for StaticBlock<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2321,7 +2211,6 @@ const TS_APPEND_CONTENT: &'static str = "export type StaticBlock = ({\n\ttype: 'StaticBlock';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for ModuleDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2342,7 +2231,6 @@ impl<'a> Serialize for ModuleDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type ModuleDeclaration = ImportDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;"; impl Serialize for AccessorPropertyType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2364,7 +2252,6 @@ const TS_APPEND_CONTENT: &'static str = "export type AccessorPropertyType = 'AccessorProperty' | 'TSAbstractAccessorProperty';"; impl<'a> Serialize for AccessorProperty<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2387,7 +2274,6 @@ impl<'a> Serialize for AccessorProperty<'a> { const TS_APPEND_CONTENT: &'static str = "export type AccessorProperty = ({\n\ttype: AccessorPropertyType;\n\tdecorators: Array;\n\tkey: PropertyKey;\n\tvalue: (Expression) | null;\n\tcomputed: boolean;\n\tstatic: boolean;\n\tdefinite: boolean;\n\ttypeAnnotation: (TSTypeAnnotation) | null;\n\taccessibility: (TSAccessibility) | null;\n}) & Span;"; impl<'a> Serialize for ImportExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2404,7 +2290,6 @@ impl<'a> Serialize for ImportExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportExpression = ({\n\ttype: 'ImportExpression';\n\tsource: Expression;\n\targuments: Array;\n}) & Span;"; impl<'a> Serialize for ImportDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2423,7 +2308,6 @@ impl<'a> Serialize for ImportDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportDeclaration = ({\n\ttype: 'ImportDeclaration';\n\tspecifiers: (Array) | null;\n\tsource: StringLiteral;\n\twithClause: (WithClause) | null;\n\timportKind: ImportOrExportKind;\n}) & Span;"; impl<'a> Serialize for ImportDeclarationSpecifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2443,7 +2327,6 @@ impl<'a> Serialize for ImportDeclarationSpecifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportDeclarationSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;"; impl<'a> Serialize for ImportSpecifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2461,7 +2344,6 @@ impl<'a> Serialize for ImportSpecifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportSpecifier = ({\n\ttype: 'ImportSpecifier';\n\timported: ModuleExportName;\n\tlocal: BindingIdentifier;\n\timportKind: ImportOrExportKind;\n}) & Span;"; impl<'a> Serialize for ImportDefaultSpecifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2477,7 +2359,6 @@ impl<'a> Serialize for ImportDefaultSpecifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportDefaultSpecifier = ({\n\ttype: 'ImportDefaultSpecifier';\n\tlocal: BindingIdentifier;\n}) & Span;"; impl<'a> Serialize for ImportNamespaceSpecifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2493,7 +2374,6 @@ impl<'a> Serialize for ImportNamespaceSpecifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportNamespaceSpecifier = ({\n\ttype: 'ImportNamespaceSpecifier';\n\tlocal: BindingIdentifier;\n}) & Span;"; impl<'a> Serialize for WithClause<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2510,7 +2390,6 @@ impl<'a> Serialize for WithClause<'a> { const TS_APPEND_CONTENT: &'static str = "export type WithClause = ({\n\ttype: 'WithClause';\n\tattributesKeyword: IdentifierName;\n\twithEntries: Array;\n}) & Span;"; impl<'a> Serialize for ImportAttribute<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2527,7 +2406,6 @@ impl<'a> Serialize for ImportAttribute<'a> { const TS_APPEND_CONTENT: &'static str = "export type ImportAttribute = ({\n\ttype: 'ImportAttribute';\n\tkey: ImportAttributeKey;\n\tvalue: StringLiteral;\n}) & Span;"; impl<'a> Serialize for ImportAttributeKey<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2543,7 +2421,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ImportAttributeKey = IdentifierName | StringLiteral;"; impl<'a> Serialize for ExportNamedDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2563,7 +2440,6 @@ impl<'a> Serialize for ExportNamedDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type ExportNamedDeclaration = ({\n\ttype: 'ExportNamedDeclaration';\n\tdeclaration: (Declaration) | null;\n\tspecifiers: Array;\n\tsource: (StringLiteral) | null;\n\texportKind: ImportOrExportKind;\n\twithClause: (WithClause) | null;\n}) & Span;"; impl<'a> Serialize for ExportDefaultDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2580,7 +2456,6 @@ impl<'a> Serialize for ExportDefaultDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type ExportDefaultDeclaration = ({\n\ttype: 'ExportDefaultDeclaration';\n\tdeclaration: ExportDefaultDeclarationKind;\n\texported: ModuleExportName;\n}) & Span;"; impl<'a> Serialize for ExportAllDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2599,7 +2474,6 @@ impl<'a> Serialize for ExportAllDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type ExportAllDeclaration = ({\n\ttype: 'ExportAllDeclaration';\n\texported: (ModuleExportName) | null;\n\tsource: StringLiteral;\n\twithClause: (WithClause) | null;\n\texportKind: ImportOrExportKind;\n}) & Span;"; impl<'a> Serialize for ExportSpecifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2617,7 +2491,6 @@ impl<'a> Serialize for ExportSpecifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type ExportSpecifier = ({\n\ttype: 'ExportSpecifier';\n\tlocal: ModuleExportName;\n\texported: ModuleExportName;\n\texportKind: ImportOrExportKind;\n}) & Span;"; impl<'a> Serialize for ExportDefaultDeclarationKind<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2719,7 +2592,6 @@ impl<'a> Serialize for ExportDefaultDeclarationKind<'a> { const TS_APPEND_CONTENT: &'static str = "export type ExportDefaultDeclarationKind = Function | Class | TSInterfaceDeclaration | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for ModuleExportName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2736,7 +2608,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;"; impl<'a> Serialize for TSThisParameter<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2753,7 +2624,6 @@ impl<'a> Serialize for TSThisParameter<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSThisParameter = ({\n\ttype: 'TSThisParameter';\n\tthisSpan: Span;\n\ttypeAnnotation: (TSTypeAnnotation) | null;\n}) & Span;"; impl<'a> Serialize for TSEnumDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2772,7 +2642,6 @@ impl<'a> Serialize for TSEnumDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSEnumDeclaration = ({\n\ttype: 'TSEnumDeclaration';\n\tid: BindingIdentifier;\n\tmembers: Array;\n\tconst: boolean;\n\tdeclare: boolean;\n}) & Span;"; impl<'a> Serialize for TSEnumMember<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2789,7 +2658,6 @@ impl<'a> Serialize for TSEnumMember<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSEnumMember = ({\n\ttype: 'TSEnumMember';\n\tid: TSEnumMemberName;\n\tinitializer: (Expression) | null;\n}) & Span;"; impl<'a> Serialize for TSEnumMemberName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2848,7 +2716,6 @@ impl<'a> Serialize for TSEnumMemberName<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral | NumericLiteral | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl<'a> Serialize for TSTypeAnnotation<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2864,7 +2731,6 @@ impl<'a> Serialize for TSTypeAnnotation<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeAnnotation = ({\n\ttype: 'TSTypeAnnotation';\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSLiteralType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2881,7 +2747,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSLiteralType = ({\n\ttype: 'TSLiteralType';\n\tliteral: TSLiteral;\n}) & Span;"; impl<'a> Serialize for TSLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2902,7 +2767,6 @@ impl<'a> Serialize for TSLiteral<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSLiteral = BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | UnaryExpression;"; impl<'a> Serialize for TSType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2953,7 +2817,6 @@ impl<'a> Serialize for TSType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSType = TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSArrayType | TSConditionalType | TSConstructorType | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSLiteralType | TSMappedType | TSNamedTupleMember | TSQualifiedName | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUnionType | TSParenthesizedType | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType;"; impl<'a> Serialize for TSConditionalType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2972,7 +2835,6 @@ impl<'a> Serialize for TSConditionalType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSConditionalType = ({\n\ttype: 'TSConditionalType';\n\tcheckType: TSType;\n\textendsType: TSType;\n\ttrueType: TSType;\n\tfalseType: TSType;\n}) & Span;"; impl<'a> Serialize for TSUnionType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -2989,7 +2851,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSUnionType = ({\n\ttype: 'TSUnionType';\n\ttypes: Array;\n}) & Span;"; impl<'a> Serialize for TSIntersectionType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3005,7 +2866,6 @@ impl<'a> Serialize for TSIntersectionType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSIntersectionType = ({\n\ttype: 'TSIntersectionType';\n\ttypes: Array;\n}) & Span;"; impl<'a> Serialize for TSParenthesizedType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3021,7 +2881,6 @@ impl<'a> Serialize for TSParenthesizedType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSParenthesizedType = ({\n\ttype: 'TSParenthesizedType';\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSTypeOperator<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3038,7 +2897,6 @@ impl<'a> Serialize for TSTypeOperator<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeOperator = ({\n\ttype: 'TSTypeOperator';\n\toperator: TSTypeOperatorOperator;\n\ttypeAnnotation: TSType;\n}) & Span;"; impl Serialize for TSTypeOperatorOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3061,7 +2919,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSTypeOperatorOperator = 'keyof' | 'unique' | 'readonly';"; impl<'a> Serialize for TSArrayType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3078,7 +2935,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSArrayType = ({\n\ttype: 'TSArrayType';\n\telementType: TSType;\n}) & Span;"; impl<'a> Serialize for TSIndexedAccessType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3095,7 +2951,6 @@ impl<'a> Serialize for TSIndexedAccessType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSIndexedAccessType = ({\n\ttype: 'TSIndexedAccessType';\n\tobjectType: TSType;\n\tindexType: TSType;\n}) & Span;"; impl<'a> Serialize for TSTupleType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3111,7 +2966,6 @@ impl<'a> Serialize for TSTupleType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTupleType = ({\n\ttype: 'TSTupleType';\n\telementTypes: Array;\n}) & Span;"; impl<'a> Serialize for TSNamedTupleMember<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3129,7 +2983,6 @@ impl<'a> Serialize for TSNamedTupleMember<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSNamedTupleMember = ({\n\ttype: 'TSNamedTupleMember';\n\telementType: TSTupleElement;\n\tlabel: IdentifierName;\n\toptional: boolean;\n}) & Span;"; impl<'a> Serialize for TSOptionalType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3145,7 +2998,6 @@ impl<'a> Serialize for TSOptionalType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSOptionalType = ({\n\ttype: 'TSOptionalType';\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSRestType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3162,7 +3014,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSRestType = ({\n\ttype: 'TSRestType';\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSTupleElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3215,7 +3066,6 @@ impl<'a> Serialize for TSTupleElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTupleElement = TSOptionalType | TSRestType | TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSArrayType | TSConditionalType | TSConstructorType | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSLiteralType | TSMappedType | TSNamedTupleMember | TSQualifiedName | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUnionType | TSParenthesizedType | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType;"; impl Serialize for TSAnyKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3231,7 +3081,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSAnyKeyword = ({\n\ttype: 'TSAnyKeyword';\n}) & Span;"; impl Serialize for TSStringKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3247,7 +3096,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSStringKeyword = ({\n\ttype: 'TSStringKeyword';\n}) & Span;"; impl Serialize for TSBooleanKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3263,7 +3111,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSBooleanKeyword = ({\n\ttype: 'TSBooleanKeyword';\n}) & Span;"; impl Serialize for TSNumberKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3279,7 +3126,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSNumberKeyword = ({\n\ttype: 'TSNumberKeyword';\n}) & Span;"; impl Serialize for TSNeverKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3295,7 +3141,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSNeverKeyword = ({\n\ttype: 'TSNeverKeyword';\n}) & Span;"; impl Serialize for TSIntrinsicKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3311,7 +3156,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSIntrinsicKeyword = ({\n\ttype: 'TSIntrinsicKeyword';\n}) & Span;"; impl Serialize for TSUnknownKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3327,7 +3171,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSUnknownKeyword = ({\n\ttype: 'TSUnknownKeyword';\n}) & Span;"; impl Serialize for TSNullKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3343,7 +3186,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSNullKeyword = ({\n\ttype: 'TSNullKeyword';\n}) & Span;"; impl Serialize for TSUndefinedKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3359,7 +3201,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSUndefinedKeyword = ({\n\ttype: 'TSUndefinedKeyword';\n}) & Span;"; impl Serialize for TSVoidKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3375,7 +3216,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSVoidKeyword = ({\n\ttype: 'TSVoidKeyword';\n}) & Span;"; impl Serialize for TSSymbolKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3391,7 +3231,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSSymbolKeyword = ({\n\ttype: 'TSSymbolKeyword';\n}) & Span;"; impl Serialize for TSThisType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3407,7 +3246,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSThisType = ({\n\ttype: 'TSThisType';\n}) & Span;"; impl Serialize for TSObjectKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3423,7 +3261,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSObjectKeyword = ({\n\ttype: 'TSObjectKeyword';\n}) & Span;"; impl Serialize for TSBigIntKeyword { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3439,7 +3276,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSBigIntKeyword = ({\n\ttype: 'TSBigIntKeyword';\n}) & Span;"; impl<'a> Serialize for TSTypeReference<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3456,7 +3292,6 @@ impl<'a> Serialize for TSTypeReference<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeReference = ({\n\ttype: 'TSTypeReference';\n\ttypeName: TSTypeName;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for TSTypeName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3472,7 +3307,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSTypeName = IdentifierReference | TSQualifiedName;"; impl<'a> Serialize for TSQualifiedName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3489,7 +3323,6 @@ impl<'a> Serialize for TSQualifiedName<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSQualifiedName = ({\n\ttype: 'TSQualifiedName';\n\tleft: TSTypeName;\n\tright: IdentifierName;\n}) & Span;"; impl<'a> Serialize for TSTypeParameterInstantiation<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3505,7 +3338,6 @@ impl<'a> Serialize for TSTypeParameterInstantiation<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeParameterInstantiation = ({\n\ttype: 'TSTypeParameterInstantiation';\n\tparams: Array;\n}) & Span;"; impl<'a> Serialize for TSTypeParameter<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3526,7 +3358,6 @@ impl<'a> Serialize for TSTypeParameter<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeParameter = ({\n\ttype: 'TSTypeParameter';\n\tname: BindingIdentifier;\n\tconstraint: (TSType) | null;\n\tdefault: (TSType) | null;\n\tin: boolean;\n\tout: boolean;\n\tconst: boolean;\n}) & Span;"; impl<'a> Serialize for TSTypeParameterDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3542,7 +3373,6 @@ impl<'a> Serialize for TSTypeParameterDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeParameterDeclaration = ({\n\ttype: 'TSTypeParameterDeclaration';\n\tparams: Array;\n}) & Span;"; impl<'a> Serialize for TSTypeAliasDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3561,7 +3391,6 @@ impl<'a> Serialize for TSTypeAliasDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeAliasDeclaration = ({\n\ttype: 'TSTypeAliasDeclaration';\n\tid: BindingIdentifier;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\ttypeAnnotation: TSType;\n\tdeclare: boolean;\n}) & Span;"; impl Serialize for TSAccessibility { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3584,7 +3413,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSAccessibility = 'private' | 'protected' | 'public';"; impl<'a> Serialize for TSClassImplements<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3601,7 +3429,6 @@ impl<'a> Serialize for TSClassImplements<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSClassImplements = ({\n\ttype: 'TSClassImplements';\n\texpression: TSTypeName;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for TSInterfaceDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3621,7 +3448,6 @@ impl<'a> Serialize for TSInterfaceDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSInterfaceDeclaration = ({\n\ttype: 'TSInterfaceDeclaration';\n\tid: BindingIdentifier;\n\textends: (Array) | null;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tbody: TSInterfaceBody;\n\tdeclare: boolean;\n}) & Span;"; impl<'a> Serialize for TSInterfaceBody<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3637,7 +3463,6 @@ impl<'a> Serialize for TSInterfaceBody<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSInterfaceBody = ({\n\ttype: 'TSInterfaceBody';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for TSPropertySignature<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3657,7 +3482,6 @@ impl<'a> Serialize for TSPropertySignature<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSPropertySignature = ({\n\ttype: 'TSPropertySignature';\n\tcomputed: boolean;\n\toptional: boolean;\n\treadonly: boolean;\n\tkey: PropertyKey;\n\ttypeAnnotation: (TSTypeAnnotation) | null;\n}) & Span;"; impl<'a> Serialize for TSSignature<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3675,7 +3499,6 @@ impl<'a> Serialize for TSSignature<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSSignature = TSIndexSignature | TSPropertySignature | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSMethodSignature;"; impl<'a> Serialize for TSIndexSignature<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3693,7 +3516,6 @@ impl<'a> Serialize for TSIndexSignature<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSIndexSignature = ({\n\ttype: 'TSIndexSignature';\n\tparameters: Array;\n\ttypeAnnotation: TSTypeAnnotation;\n\treadonly: boolean;\n}) & Span;"; impl<'a> Serialize for TSCallSignatureDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3712,7 +3534,6 @@ impl<'a> Serialize for TSCallSignatureDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSCallSignatureDeclaration = ({\n\ttype: 'TSCallSignatureDeclaration';\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tthisParam: (TSThisParameter) | null;\n\tparams: FormalParameters;\n\treturnType: (TSTypeAnnotation) | null;\n}) & Span;"; impl Serialize for TSMethodSignatureKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3735,7 +3556,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSMethodSignatureKind = 'method' | 'get' | 'set';"; impl<'a> Serialize for TSMethodSignature<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3758,7 +3578,6 @@ impl<'a> Serialize for TSMethodSignature<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSMethodSignature = ({\n\ttype: 'TSMethodSignature';\n\tkey: PropertyKey;\n\tcomputed: boolean;\n\toptional: boolean;\n\tkind: TSMethodSignatureKind;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tthisParam: (TSThisParameter) | null;\n\tparams: FormalParameters;\n\treturnType: (TSTypeAnnotation) | null;\n}) & Span;"; impl<'a> Serialize for TSConstructSignatureDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3776,7 +3595,6 @@ impl<'a> Serialize for TSConstructSignatureDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSConstructSignatureDeclaration = ({\n\ttype: 'TSConstructSignatureDeclaration';\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tparams: FormalParameters;\n\treturnType: (TSTypeAnnotation) | null;\n}) & Span;"; impl<'a> Serialize for TSIndexSignatureName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3793,7 +3611,6 @@ impl<'a> Serialize for TSIndexSignatureName<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSIndexSignatureName = ({\n\ttype: 'Identifier';\n\tname: string;\n\ttypeAnnotation: TSTypeAnnotation;\n}) & Span;"; impl<'a> Serialize for TSInterfaceHeritage<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3810,7 +3627,6 @@ impl<'a> Serialize for TSInterfaceHeritage<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSInterfaceHeritage = ({\n\ttype: 'TSInterfaceHeritage';\n\texpression: Expression;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for TSTypePredicate<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3828,7 +3644,6 @@ impl<'a> Serialize for TSTypePredicate<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypePredicate = ({\n\ttype: 'TSTypePredicate';\n\tparameterName: TSTypePredicateName;\n\tasserts: boolean;\n\ttypeAnnotation: (TSTypeAnnotation) | null;\n}) & Span;"; impl<'a> Serialize for TSTypePredicateName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3844,7 +3659,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSTypePredicateName = IdentifierName | TSThisType;"; impl<'a> Serialize for TSModuleDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3863,7 +3677,6 @@ impl<'a> Serialize for TSModuleDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSModuleDeclaration = ({\n\ttype: 'TSModuleDeclaration';\n\tid: TSModuleDeclarationName;\n\tbody: (TSModuleDeclarationBody) | null;\n\tkind: TSModuleDeclarationKind;\n\tdeclare: boolean;\n}) & Span;"; impl Serialize for TSModuleDeclarationKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3886,7 +3699,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSModuleDeclarationKind = 'global' | 'module' | 'namespace';"; impl<'a> Serialize for TSModuleDeclarationName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3902,7 +3714,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSModuleDeclarationName = BindingIdentifier | StringLiteral;"; impl<'a> Serialize for TSModuleDeclarationBody<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3921,7 +3732,6 @@ const TS_APPEND_CONTENT: &'static str = const TS_APPEND_CONTENT: &'static str = "export type TSModuleBlock = ({\n\ttype: 'TSModuleBlock';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for TSTypeLiteral<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3937,7 +3747,6 @@ impl<'a> Serialize for TSTypeLiteral<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeLiteral = ({\n\ttype: 'TSTypeLiteral';\n\tmembers: Array;\n}) & Span;"; impl<'a> Serialize for TSInferType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3953,7 +3762,6 @@ impl<'a> Serialize for TSInferType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSInferType = ({\n\ttype: 'TSInferType';\n\ttypeParameter: TSTypeParameter;\n}) & Span;"; impl<'a> Serialize for TSTypeQuery<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3970,7 +3778,6 @@ impl<'a> Serialize for TSTypeQuery<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeQuery = ({\n\ttype: 'TSTypeQuery';\n\texprName: TSTypeQueryExprName;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for TSTypeQueryExprName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -3987,7 +3794,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSTypeQueryExprName = TSImportType | IdentifierReference | TSQualifiedName;"; impl<'a> Serialize for TSImportType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4007,7 +3813,6 @@ impl<'a> Serialize for TSImportType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSImportType = ({\n\ttype: 'TSImportType';\n\tisTypeOf: boolean;\n\tparameter: TSType;\n\tqualifier: (TSTypeName) | null;\n\tattributes: (TSImportAttributes) | null;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for TSImportAttributes<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4024,7 +3829,6 @@ impl<'a> Serialize for TSImportAttributes<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSImportAttributes = ({\n\ttype: 'TSImportAttributes';\n\tattributesKeyword: IdentifierName;\n\telements: Array;\n}) & Span;"; impl<'a> Serialize for TSImportAttribute<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4041,7 +3845,6 @@ impl<'a> Serialize for TSImportAttribute<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSImportAttribute = ({\n\ttype: 'TSImportAttribute';\n\tname: TSImportAttributeName;\n\tvalue: Expression;\n}) & Span;"; impl<'a> Serialize for TSImportAttributeName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4057,7 +3860,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSImportAttributeName = IdentifierName | StringLiteral;"; impl<'a> Serialize for TSFunctionType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4076,7 +3878,6 @@ impl<'a> Serialize for TSFunctionType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSFunctionType = ({\n\ttype: 'TSFunctionType';\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tthisParam: (TSThisParameter) | null;\n\tparams: FormalParameters;\n\treturnType: TSTypeAnnotation;\n}) & Span;"; impl<'a> Serialize for TSConstructorType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4095,7 +3896,6 @@ impl<'a> Serialize for TSConstructorType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSConstructorType = ({\n\ttype: 'TSConstructorType';\n\tabstract: boolean;\n\ttypeParameters: (TSTypeParameterDeclaration) | null;\n\tparams: FormalParameters;\n\treturnType: TSTypeAnnotation;\n}) & Span;"; impl<'a> Serialize for TSMappedType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4115,7 +3915,6 @@ impl<'a> Serialize for TSMappedType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSMappedType = ({\n\ttype: 'TSMappedType';\n\ttypeParameter: TSTypeParameter;\n\tnameType: (TSType) | null;\n\ttypeAnnotation: (TSType) | null;\n\toptional: TSMappedTypeModifierOperator;\n\treadonly: TSMappedTypeModifierOperator;\n}) & Span;"; impl Serialize for TSMappedTypeModifierOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4141,7 +3940,6 @@ const TS_APPEND_CONTENT: &'static str = "export type TSMappedTypeModifierOperator = 'true' | '+' | '-' | 'none';"; impl<'a> Serialize for TSTemplateLiteralType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4158,7 +3956,6 @@ impl<'a> Serialize for TSTemplateLiteralType<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTemplateLiteralType = ({\n\ttype: 'TSTemplateLiteralType';\n\tquasis: Array;\n\ttypes: Array;\n}) & Span;"; impl<'a> Serialize for TSAsExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4175,7 +3972,6 @@ impl<'a> Serialize for TSAsExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSAsExpression = ({\n\ttype: 'TSAsExpression';\n\texpression: Expression;\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSSatisfiesExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4192,7 +3988,6 @@ impl<'a> Serialize for TSSatisfiesExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSSatisfiesExpression = ({\n\ttype: 'TSSatisfiesExpression';\n\texpression: Expression;\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSTypeAssertion<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4209,7 +4004,6 @@ impl<'a> Serialize for TSTypeAssertion<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSTypeAssertion = ({\n\ttype: 'TSTypeAssertion';\n\texpression: Expression;\n\ttypeAnnotation: TSType;\n}) & Span;"; impl<'a> Serialize for TSImportEqualsDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4227,7 +4021,6 @@ impl<'a> Serialize for TSImportEqualsDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSImportEqualsDeclaration = ({\n\ttype: 'TSImportEqualsDeclaration';\n\tid: BindingIdentifier;\n\tmoduleReference: TSModuleReference;\n\timportKind: ImportOrExportKind;\n}) & Span;"; impl<'a> Serialize for TSModuleReference<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4243,7 +4036,6 @@ impl<'a> Serialize for TSModuleReference<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSModuleReference = TSExternalModuleReference | IdentifierReference | TSQualifiedName;"; impl<'a> Serialize for TSExternalModuleReference<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4259,7 +4051,6 @@ impl<'a> Serialize for TSExternalModuleReference<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSExternalModuleReference = ({\n\ttype: 'TSExternalModuleReference';\n\texpression: StringLiteral;\n}) & Span;"; impl<'a> Serialize for TSNonNullExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4275,7 +4066,6 @@ impl<'a> Serialize for TSNonNullExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSNonNullExpression = ({\n\ttype: 'TSNonNullExpression';\n\texpression: Expression;\n}) & Span;"; impl<'a> Serialize for Decorator<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4292,7 +4082,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Decorator = ({\n\ttype: 'Decorator';\n\texpression: Expression;\n}) & Span;"; impl<'a> Serialize for TSExportAssignment<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4308,7 +4097,6 @@ impl<'a> Serialize for TSExportAssignment<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSExportAssignment = ({\n\ttype: 'TSExportAssignment';\n\texpression: Expression;\n}) & Span;"; impl<'a> Serialize for TSNamespaceExportDeclaration<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4324,7 +4112,6 @@ impl<'a> Serialize for TSNamespaceExportDeclaration<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSNamespaceExportDeclaration = ({\n\ttype: 'TSNamespaceExportDeclaration';\n\tid: IdentifierName;\n}) & Span;"; impl<'a> Serialize for TSInstantiationExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4341,7 +4128,6 @@ impl<'a> Serialize for TSInstantiationExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type TSInstantiationExpression = ({\n\ttype: 'TSInstantiationExpression';\n\texpression: Expression;\n\ttypeParameters: TSTypeParameterInstantiation;\n}) & Span;"; impl Serialize for ImportOrExportKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4360,7 +4146,6 @@ impl Serialize for ImportOrExportKind { const TS_APPEND_CONTENT: &'static str = "export type ImportOrExportKind = 'value' | 'type';"; impl<'a> Serialize for JSDocNullableType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4377,7 +4162,6 @@ impl<'a> Serialize for JSDocNullableType<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSDocNullableType = ({\n\ttype: 'JSDocNullableType';\n\ttypeAnnotation: TSType;\n\tpostfix: boolean;\n}) & Span;"; impl<'a> Serialize for JSDocNonNullableType<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4394,7 +4178,6 @@ impl<'a> Serialize for JSDocNonNullableType<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSDocNonNullableType = ({\n\ttype: 'JSDocNonNullableType';\n\ttypeAnnotation: TSType;\n\tpostfix: boolean;\n}) & Span;"; impl Serialize for JSDocUnknownType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4410,7 +4193,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSDocUnknownType = ({\n\ttype: 'JSDocUnknownType';\n}) & Span;"; impl<'a> Serialize for JSXElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4428,7 +4210,6 @@ impl<'a> Serialize for JSXElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXElement = ({\n\ttype: 'JSXElement';\n\topeningElement: JSXOpeningElement;\n\tclosingElement: (JSXClosingElement) | null;\n\tchildren: Array;\n}) & Span;"; impl<'a> Serialize for JSXOpeningElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4447,7 +4228,6 @@ impl<'a> Serialize for JSXOpeningElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXOpeningElement = ({\n\ttype: 'JSXOpeningElement';\n\tselfClosing: boolean;\n\tname: JSXElementName;\n\tattributes: Array;\n\ttypeParameters: (TSTypeParameterInstantiation) | null;\n}) & Span;"; impl<'a> Serialize for JSXClosingElement<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4463,7 +4243,6 @@ impl<'a> Serialize for JSXClosingElement<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXClosingElement = ({\n\ttype: 'JSXClosingElement';\n\tname: JSXElementName;\n}) & Span;"; impl<'a> Serialize for JSXFragment<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4481,7 +4260,6 @@ impl<'a> Serialize for JSXFragment<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXFragment = ({\n\ttype: 'JSXFragment';\n\topeningFragment: JSXOpeningFragment;\n\tclosingFragment: JSXClosingFragment;\n\tchildren: Array;\n}) & Span;"; impl Serialize for JSXOpeningFragment { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4497,7 +4275,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSXOpeningFragment = ({\n\ttype: 'JSXOpeningFragment';\n}) & Span;"; impl Serialize for JSXClosingFragment { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4513,7 +4290,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSXClosingFragment = ({\n\ttype: 'JSXClosingFragment';\n}) & Span;"; impl<'a> Serialize for JSXNamespacedName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4530,7 +4306,6 @@ impl<'a> Serialize for JSXNamespacedName<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXNamespacedName = ({\n\ttype: 'JSXNamespacedName';\n\tnamespace: JSXIdentifier;\n\tproperty: JSXIdentifier;\n}) & Span;"; impl<'a> Serialize for JSXMemberExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4547,7 +4322,6 @@ impl<'a> Serialize for JSXMemberExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXMemberExpression = ({\n\ttype: 'JSXMemberExpression';\n\tobject: JSXMemberExpressionObject;\n\tproperty: JSXIdentifier;\n}) & Span;"; impl<'a> Serialize for JSXExpressionContainer<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4563,7 +4337,6 @@ impl<'a> Serialize for JSXExpressionContainer<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXExpressionContainer = ({\n\ttype: 'JSXExpressionContainer';\n\texpression: JSXExpression;\n}) & Span;"; impl<'a> Serialize for JSXExpression<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4619,7 +4392,6 @@ impl<'a> Serialize for JSXExpression<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXExpression = JSXEmptyExpression | BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;"; impl Serialize for JSXEmptyExpression { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4635,7 +4407,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSXEmptyExpression = ({\n\ttype: 'JSXEmptyExpression';\n}) & Span;"; impl<'a> Serialize for JSXAttributeItem<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4651,7 +4422,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;"; impl<'a> Serialize for JSXAttribute<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4668,7 +4438,6 @@ impl<'a> Serialize for JSXAttribute<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXAttribute = ({\n\ttype: 'JSXAttribute';\n\tname: JSXAttributeName;\n\tvalue: (JSXAttributeValue) | null;\n}) & Span;"; impl<'a> Serialize for JSXSpreadAttribute<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4684,7 +4453,6 @@ impl<'a> Serialize for JSXSpreadAttribute<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXSpreadAttribute = ({\n\ttype: 'JSXSpreadAttribute';\n\targument: Expression;\n}) & Span;"; impl<'a> Serialize for JSXAttributeName<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4700,7 +4468,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSXAttributeName = JSXIdentifier | JSXNamespacedName;"; impl<'a> Serialize for JSXAttributeValue<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4717,7 +4484,6 @@ impl<'a> Serialize for JSXAttributeValue<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;"; impl<'a> Serialize for JSXIdentifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4734,7 +4500,6 @@ const TS_APPEND_CONTENT: &'static str = "export type JSXIdentifier = ({\n\ttype: 'JSXIdentifier';\n\tname: string;\n}) & Span;"; impl<'a> Serialize for JSXChild<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4752,7 +4517,6 @@ impl<'a> Serialize for JSXChild<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;"; impl<'a> Serialize for JSXSpreadChild<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -4768,7 +4532,6 @@ impl<'a> Serialize for JSXSpreadChild<'a> { const TS_APPEND_CONTENT: &'static str = "export type JSXSpreadChild = ({\n\ttype: 'JSXSpreadChild';\n\texpression: Expression;\n}) & Span;"; impl<'a> Serialize for JSXText<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, diff --git a/crates/oxc_regular_expression/src/generated/derive_estree.rs b/crates/oxc_regular_expression/src/generated/derive_estree.rs index a06baf62f4146..a520b120429fe 100644 --- a/crates/oxc_regular_expression/src/generated/derive_estree.rs +++ b/crates/oxc_regular_expression/src/generated/derive_estree.rs @@ -1,14 +1,14 @@ // Auto-generated code, DO NOT EDIT DIRECTLY! // To edit this generated file you have to edit `tasks/ast_tools/src/derives/estree.rs` -#[allow(unused_imports)] +#![allow(unused_imports, unused_mut, clippy::match_same_arms)] + use serde::{ser::SerializeMap, Serialize, Serializer}; #[allow(clippy::wildcard_imports)] use crate::ast::*; impl<'a> Serialize for Pattern<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -25,7 +25,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Pattern = ({\n\ttype: 'Pattern';\n\tbody: Disjunction;\n}) & Span;"; impl<'a> Serialize for Disjunction<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -42,7 +41,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Disjunction = ({\n\ttype: 'Disjunction';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for Alternative<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -59,7 +57,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Alternative = ({\n\ttype: 'Alternative';\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for Term<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -84,7 +81,6 @@ impl<'a> Serialize for Term<'a> { const TS_APPEND_CONTENT: &'static str = "export type Term = BoundaryAssertion | LookAroundAssertion | Quantifier | Character | Dot | CharacterClassEscape | UnicodePropertyEscape | CharacterClass | CapturingGroup | IgnoreGroup | IndexedReference | NamedReference;"; impl Serialize for BoundaryAssertion { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -100,7 +96,6 @@ impl Serialize for BoundaryAssertion { const TS_APPEND_CONTENT: &'static str = "export type BoundaryAssertion = ({\n\ttype: 'BoundaryAssertion';\n\tspan: Span;\n\tkind: BoundaryAssertionKind;\n});"; impl Serialize for BoundaryAssertionKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -126,7 +121,6 @@ const TS_APPEND_CONTENT: &'static str = "export type BoundaryAssertionKind = 'start' | 'end' | 'boundary' | 'negativeBoundary';"; impl<'a> Serialize for LookAroundAssertion<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -143,7 +137,6 @@ impl<'a> Serialize for LookAroundAssertion<'a> { const TS_APPEND_CONTENT: &'static str = "export type LookAroundAssertion = ({\n\ttype: 'LookAroundAssertion';\n\tkind: LookAroundAssertionKind;\n\tbody: Disjunction;\n}) & Span;"; impl Serialize for LookAroundAssertionKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -172,7 +165,6 @@ impl Serialize for LookAroundAssertionKind { const TS_APPEND_CONTENT: &'static str = "export type LookAroundAssertionKind = 'lookahead' | 'negativeLookahead' | 'lookbehind' | 'negativeLookbehind';"; impl<'a> Serialize for Quantifier<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -191,7 +183,6 @@ impl<'a> Serialize for Quantifier<'a> { const TS_APPEND_CONTENT: &'static str = "export type Quantifier = ({\n\ttype: 'Quantifier';\n\tmin: number;\n\tmax: (number) | null;\n\tgreedy: boolean;\n\tbody: Term;\n}) & Span;"; impl Serialize for Character { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -208,7 +199,6 @@ impl Serialize for Character { const TS_APPEND_CONTENT: &'static str = "export type Character = ({\n\ttype: 'Character';\n\tkind: CharacterKind;\n\tvalue: number;\n}) & Span;"; impl Serialize for CharacterKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -249,7 +239,6 @@ impl Serialize for CharacterKind { const TS_APPEND_CONTENT: &'static str = "export type CharacterKind = 'controlLetter' | 'hexadecimalEscape' | 'identifier' | 'null' | 'octal1' | 'octal2' | 'octal3' | 'singleEscape' | 'symbol' | 'unicodeEscape';"; impl Serialize for CharacterClassEscape { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -265,7 +254,6 @@ impl Serialize for CharacterClassEscape { const TS_APPEND_CONTENT: &'static str = "export type CharacterClassEscape = ({\n\ttype: 'CharacterClassEscape';\n\tkind: CharacterClassEscapeKind;\n}) & Span;"; impl Serialize for CharacterClassEscapeKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -296,7 +284,6 @@ impl Serialize for CharacterClassEscapeKind { const TS_APPEND_CONTENT: &'static str = "export type CharacterClassEscapeKind = 'd' | 'negativeD' | 's' | 'negativeS' | 'w' | 'negativeW';"; impl<'a> Serialize for UnicodePropertyEscape<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -315,7 +302,6 @@ impl<'a> Serialize for UnicodePropertyEscape<'a> { const TS_APPEND_CONTENT: &'static str = "export type UnicodePropertyEscape = ({\n\ttype: 'UnicodePropertyEscape';\n\tnegative: boolean;\n\tstrings: boolean;\n\tname: string;\n\tvalue: (string) | null;\n}) & Span;"; impl Serialize for Dot { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -330,7 +316,6 @@ impl Serialize for Dot { const TS_APPEND_CONTENT: &'static str = "export type Dot = ({\n\ttype: 'Dot';\n}) & Span;"; impl<'a> Serialize for CharacterClass<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -349,7 +334,6 @@ impl<'a> Serialize for CharacterClass<'a> { const TS_APPEND_CONTENT: &'static str = "export type CharacterClass = ({\n\ttype: 'CharacterClass';\n\tnegative: boolean;\n\tstrings: boolean;\n\tkind: CharacterClassContentsKind;\n\tbody: Array;\n}) & Span;"; impl Serialize for CharacterClassContentsKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -374,7 +358,6 @@ const TS_APPEND_CONTENT: &'static str = "export type CharacterClassContentsKind = 'union' | 'intersection' | 'subtraction';"; impl<'a> Serialize for CharacterClassContents<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -395,7 +378,6 @@ impl<'a> Serialize for CharacterClassContents<'a> { const TS_APPEND_CONTENT: &'static str = "export type CharacterClassContents = CharacterClassRange | CharacterClassEscape | UnicodePropertyEscape | Character | CharacterClass | ClassStringDisjunction;"; impl Serialize for CharacterClassRange { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -412,7 +394,6 @@ impl Serialize for CharacterClassRange { const TS_APPEND_CONTENT: &'static str = "export type CharacterClassRange = ({\n\ttype: 'CharacterClassRange';\n\tmin: Character;\n\tmax: Character;\n}) & Span;"; impl<'a> Serialize for ClassStringDisjunction<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -429,7 +410,6 @@ impl<'a> Serialize for ClassStringDisjunction<'a> { const TS_APPEND_CONTENT: &'static str = "export type ClassStringDisjunction = ({\n\ttype: 'ClassStringDisjunction';\n\tstrings: boolean;\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for ClassString<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -446,7 +426,6 @@ impl<'a> Serialize for ClassString<'a> { const TS_APPEND_CONTENT: &'static str = "export type ClassString = ({\n\ttype: 'ClassString';\n\tstrings: boolean;\n\tbody: Array;\n}) & Span;"; impl<'a> Serialize for CapturingGroup<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -463,7 +442,6 @@ impl<'a> Serialize for CapturingGroup<'a> { const TS_APPEND_CONTENT: &'static str = "export type CapturingGroup = ({\n\ttype: 'CapturingGroup';\n\tname: (string) | null;\n\tbody: Disjunction;\n}) & Span;"; impl<'a> Serialize for IgnoreGroup<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -480,7 +458,6 @@ impl<'a> Serialize for IgnoreGroup<'a> { const TS_APPEND_CONTENT: &'static str = "export type IgnoreGroup = ({\n\ttype: 'IgnoreGroup';\n\tmodifiers: (Modifiers) | null;\n\tbody: Disjunction;\n}) & Span;"; impl Serialize for Modifiers { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -497,7 +474,6 @@ impl Serialize for Modifiers { const TS_APPEND_CONTENT: &'static str = "export type Modifiers = ({\n\ttype: 'Modifiers';\n\tenabling: (Modifier) | null;\n\tdisabling: (Modifier) | null;\n}) & Span;"; impl Serialize for Modifier { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -514,7 +490,6 @@ impl Serialize for Modifier { const TS_APPEND_CONTENT: &'static str = "export type Modifier = ({\n\ttype: 'Modifier';\n\tignoreCase: boolean;\n\tmultiline: boolean;\n\tsticky: boolean;\n});"; impl Serialize for IndexedReference { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -531,7 +506,6 @@ const TS_APPEND_CONTENT: &'static str = "export type IndexedReference = ({\n\ttype: 'IndexedReference';\n\tindex: number;\n}) & Span;"; impl<'a> Serialize for NamedReference<'a> { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, diff --git a/crates/oxc_span/src/generated/derive_estree.rs b/crates/oxc_span/src/generated/derive_estree.rs index 8955ff0566d37..64eb109f95f48 100644 --- a/crates/oxc_span/src/generated/derive_estree.rs +++ b/crates/oxc_span/src/generated/derive_estree.rs @@ -1,7 +1,8 @@ // Auto-generated code, DO NOT EDIT DIRECTLY! // To edit this generated file you have to edit `tasks/ast_tools/src/derives/estree.rs` -#[allow(unused_imports)] +#![allow(unused_imports, unused_mut, clippy::match_same_arms)] + use serde::{ser::SerializeMap, Serialize, Serializer}; #[allow(clippy::wildcard_imports)] @@ -11,7 +12,6 @@ use crate::source_type::*; use crate::span::types::*; impl Serialize for Span { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -27,7 +27,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Span = ({\n\tstart: number;\n\tend: number;\n});"; impl Serialize for SourceType { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -43,7 +42,6 @@ impl Serialize for SourceType { const TS_APPEND_CONTENT: &'static str = "export type SourceType = ({\n\tlanguage: Language;\n\tmoduleKind: ModuleKind;\n\tvariant: LanguageVariant;\n});"; impl Serialize for Language { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -66,7 +64,6 @@ const TS_APPEND_CONTENT: &'static str = "export type Language = 'javascript' | 'typescript' | 'typescriptDefinition';"; impl Serialize for ModuleKind { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -85,7 +82,6 @@ const TS_APPEND_CONTENT: &'static str = "export type ModuleKind = 'script' | 'module' | 'unambiguous';"; impl Serialize for LanguageVariant { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, diff --git a/crates/oxc_syntax/src/generated/derive_estree.rs b/crates/oxc_syntax/src/generated/derive_estree.rs index 8a61f93311c9b..342af26fc3cd8 100644 --- a/crates/oxc_syntax/src/generated/derive_estree.rs +++ b/crates/oxc_syntax/src/generated/derive_estree.rs @@ -1,14 +1,14 @@ // Auto-generated code, DO NOT EDIT DIRECTLY! // To edit this generated file you have to edit `tasks/ast_tools/src/derives/estree.rs` -#[allow(unused_imports)] +#![allow(unused_imports, unused_mut, clippy::match_same_arms)] + use serde::{ser::SerializeMap, Serialize, Serializer}; #[allow(clippy::wildcard_imports)] use crate::operator::*; impl Serialize for AssignmentOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -69,7 +69,6 @@ impl Serialize for AssignmentOperator { const TS_APPEND_CONTENT: &'static str = "export type AssignmentOperator = '=' | '+=' | '-=' | '*=' | '/=' | '%=' | '<<=' | '>>=' | '>>>=' | '|=' | '^=' | '&=' | '&&=' | '||=' | '??=' | '**=';"; impl Serialize for BinaryOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -146,7 +145,6 @@ impl Serialize for BinaryOperator { const TS_APPEND_CONTENT: &'static str = "export type BinaryOperator = '==' | '!=' | '===' | '!==' | '<' | '<=' | '>' | '>=' | '<<' | '>>' | '>>>' | '+' | '-' | '*' | '/' | '%' | '|' | '^' | '&' | 'in' | 'instanceof' | '**';"; impl Serialize for LogicalOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -166,7 +164,6 @@ impl Serialize for LogicalOperator { const TS_APPEND_CONTENT: &'static str = "export type LogicalOperator = '||' | '&&' | '??';"; impl Serialize for UnaryOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -199,7 +196,6 @@ const TS_APPEND_CONTENT: &'static str = "export type UnaryOperator = '-' | '+' | '!' | '~' | 'typeof' | 'void' | 'delete';"; impl Serialize for UpdateOperator { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, diff --git a/tasks/ast_tools/src/derives/estree.rs b/tasks/ast_tools/src/derives/estree.rs index b0ea25186d639..a458f91b0e7d4 100644 --- a/tasks/ast_tools/src/derives/estree.rs +++ b/tasks/ast_tools/src/derives/estree.rs @@ -51,7 +51,6 @@ impl Derive for DeriveESTree { let lifetime = if def.has_lifetime() { quote!(<'a>) } else { TokenStream::new() }; quote! { impl #lifetime Serialize for #ident #lifetime { - #[allow(clippy::match_same_arms, unused_mut)] fn serialize(&self, serializer: S) -> Result where S: Serializer, { @@ -64,7 +63,9 @@ impl Derive for DeriveESTree { fn prelude() -> TokenStream { quote! { - #[allow(unused_imports)] + #![allow(unused_imports, unused_mut, clippy::match_same_arms)] + + ///@@line_break use serde::{Serialize, Serializer, ser::SerializeMap}; } }