diff options
author | Geoffrey Copin <[email protected]> | 2020-04-11 16:04:25 +0100 |
---|---|---|
committer | Geoffrey Copin <[email protected]> | 2020-04-11 18:30:41 +0100 |
commit | 270bcfdfc226bcdfffd7b8aa903073929fcef5f2 (patch) | |
tree | 3d26bc3e2bcf02add4d86916121d1837bc3d9525 /crates/ra_syntax/src/ast/generated | |
parent | 21443f1b4839872841d8f32e87209f2106d43ad8 (diff) |
Avoid adding a RecordFieldPat variant to the Pat enum
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r-- | crates/ra_syntax/src/ast/generated/nodes.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs index 79b225622..20f663046 100644 --- a/crates/ra_syntax/src/ast/generated/nodes.rs +++ b/crates/ra_syntax/src/ast/generated/nodes.rs | |||
@@ -3256,7 +3256,6 @@ pub enum Pat { | |||
3256 | RangePat(RangePat), | 3256 | RangePat(RangePat), |
3257 | LiteralPat(LiteralPat), | 3257 | LiteralPat(LiteralPat), |
3258 | MacroPat(MacroPat), | 3258 | MacroPat(MacroPat), |
3259 | RecordFieldPat(RecordFieldPat), | ||
3260 | } | 3259 | } |
3261 | impl From<OrPat> for Pat { | 3260 | impl From<OrPat> for Pat { |
3262 | fn from(node: OrPat) -> Pat { Pat::OrPat(node) } | 3261 | fn from(node: OrPat) -> Pat { Pat::OrPat(node) } |
@@ -3303,15 +3302,12 @@ impl From<LiteralPat> for Pat { | |||
3303 | impl From<MacroPat> for Pat { | 3302 | impl From<MacroPat> for Pat { |
3304 | fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) } | 3303 | fn from(node: MacroPat) -> Pat { Pat::MacroPat(node) } |
3305 | } | 3304 | } |
3306 | impl From<RecordFieldPat> for Pat { | ||
3307 | fn from(node: RecordFieldPat) -> Pat { Pat::RecordFieldPat(node) } | ||
3308 | } | ||
3309 | impl AstNode for Pat { | 3305 | impl AstNode for Pat { |
3310 | fn can_cast(kind: SyntaxKind) -> bool { | 3306 | fn can_cast(kind: SyntaxKind) -> bool { |
3311 | match kind { | 3307 | match kind { |
3312 | OR_PAT | PAREN_PAT | REF_PAT | BOX_PAT | BIND_PAT | PLACEHOLDER_PAT | DOT_DOT_PAT | 3308 | OR_PAT | PAREN_PAT | REF_PAT | BOX_PAT | BIND_PAT | PLACEHOLDER_PAT | DOT_DOT_PAT |
3313 | | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT | TUPLE_PAT | SLICE_PAT | RANGE_PAT | 3309 | | PATH_PAT | RECORD_PAT | TUPLE_STRUCT_PAT | TUPLE_PAT | SLICE_PAT | RANGE_PAT |
3314 | | LITERAL_PAT | MACRO_PAT | RECORD_FIELD_PAT => true, | 3310 | | LITERAL_PAT | MACRO_PAT => true, |
3315 | _ => false, | 3311 | _ => false, |
3316 | } | 3312 | } |
3317 | } | 3313 | } |
@@ -3332,7 +3328,6 @@ impl AstNode for Pat { | |||
3332 | RANGE_PAT => Pat::RangePat(RangePat { syntax }), | 3328 | RANGE_PAT => Pat::RangePat(RangePat { syntax }), |
3333 | LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }), | 3329 | LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }), |
3334 | MACRO_PAT => Pat::MacroPat(MacroPat { syntax }), | 3330 | MACRO_PAT => Pat::MacroPat(MacroPat { syntax }), |
3335 | RECORD_FIELD_PAT => Pat::RecordFieldPat(RecordFieldPat { syntax }), | ||
3336 | _ => return None, | 3331 | _ => return None, |
3337 | }; | 3332 | }; |
3338 | Some(res) | 3333 | Some(res) |
@@ -3354,7 +3349,6 @@ impl AstNode for Pat { | |||
3354 | Pat::RangePat(it) => &it.syntax, | 3349 | Pat::RangePat(it) => &it.syntax, |
3355 | Pat::LiteralPat(it) => &it.syntax, | 3350 | Pat::LiteralPat(it) => &it.syntax, |
3356 | Pat::MacroPat(it) => &it.syntax, | 3351 | Pat::MacroPat(it) => &it.syntax, |
3357 | Pat::RecordFieldPat(it) => &it.syntax, | ||
3358 | } | 3352 | } |
3359 | } | 3353 | } |
3360 | } | 3354 | } |