aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/generated
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/generated')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 01aefb60d..6cb637b1d 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -1130,10 +1130,10 @@ impl BoxPat {
1130 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) } 1130 pub fn pat(&self) -> Option<Pat> { support::child(&self.syntax) }
1131} 1131}
1132#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1132#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1133pub struct DotDotPat { 1133pub struct RestPat {
1134 pub(crate) syntax: SyntaxNode, 1134 pub(crate) syntax: SyntaxNode,
1135} 1135}
1136impl DotDotPat { 1136impl RestPat {
1137 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) } 1137 pub fn dotdot_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![..]) }
1138} 1138}
1139#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1139#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1336,7 +1336,7 @@ pub enum Stmt {
1336pub enum Pat { 1336pub enum Pat {
1337 IdentPat(IdentPat), 1337 IdentPat(IdentPat),
1338 BoxPat(BoxPat), 1338 BoxPat(BoxPat),
1339 DotDotPat(DotDotPat), 1339 RestPat(RestPat),
1340 LiteralPat(LiteralPat), 1340 LiteralPat(LiteralPat),
1341 MacroPat(MacroPat), 1341 MacroPat(MacroPat),
1342 OrPat(OrPat), 1342 OrPat(OrPat),
@@ -2577,8 +2577,8 @@ impl AstNode for BoxPat {
2577 } 2577 }
2578 fn syntax(&self) -> &SyntaxNode { &self.syntax } 2578 fn syntax(&self) -> &SyntaxNode { &self.syntax }
2579} 2579}
2580impl AstNode for DotDotPat { 2580impl AstNode for RestPat {
2581 fn can_cast(kind: SyntaxKind) -> bool { kind == DOT_DOT_PAT } 2581 fn can_cast(kind: SyntaxKind) -> bool { kind == REST_PAT }
2582 fn cast(syntax: SyntaxNode) -> Option<Self> { 2582 fn cast(syntax: SyntaxNode) -> Option<Self> {
2583 if Self::can_cast(syntax.kind()) { 2583 if Self::can_cast(syntax.kind()) {
2584 Some(Self { syntax }) 2584 Some(Self { syntax })
@@ -3141,8 +3141,8 @@ impl From<IdentPat> for Pat {
3141impl From<BoxPat> for Pat { 3141impl From<BoxPat> for Pat {
3142 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) } 3142 fn from(node: BoxPat) -> Pat { Pat::BoxPat(node) }
3143} 3143}
3144impl From<DotDotPat> for Pat { 3144impl From<RestPat> for Pat {
3145 fn from(node: DotDotPat) -> Pat { Pat::DotDotPat(node) } 3145 fn from(node: RestPat) -> Pat { Pat::RestPat(node) }
3146} 3146}
3147impl From<LiteralPat> for Pat { 3147impl From<LiteralPat> for Pat {
3148 fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) } 3148 fn from(node: LiteralPat) -> Pat { Pat::LiteralPat(node) }
@@ -3183,7 +3183,7 @@ impl From<TupleStructPat> for Pat {
3183impl AstNode for Pat { 3183impl AstNode for Pat {
3184 fn can_cast(kind: SyntaxKind) -> bool { 3184 fn can_cast(kind: SyntaxKind) -> bool {
3185 match kind { 3185 match kind {
3186 IDENT_PAT | BOX_PAT | DOT_DOT_PAT | LITERAL_PAT | MACRO_PAT | OR_PAT | PAREN_PAT 3186 IDENT_PAT | BOX_PAT | REST_PAT | LITERAL_PAT | MACRO_PAT | OR_PAT | PAREN_PAT
3187 | PATH_PAT | WILDCARD_PAT | RANGE_PAT | RECORD_PAT | REF_PAT | SLICE_PAT 3187 | PATH_PAT | WILDCARD_PAT | RANGE_PAT | RECORD_PAT | REF_PAT | SLICE_PAT
3188 | TUPLE_PAT | TUPLE_STRUCT_PAT => true, 3188 | TUPLE_PAT | TUPLE_STRUCT_PAT => true,
3189 _ => false, 3189 _ => false,
@@ -3193,7 +3193,7 @@ impl AstNode for Pat {
3193 let res = match syntax.kind() { 3193 let res = match syntax.kind() {
3194 IDENT_PAT => Pat::IdentPat(IdentPat { syntax }), 3194 IDENT_PAT => Pat::IdentPat(IdentPat { syntax }),
3195 BOX_PAT => Pat::BoxPat(BoxPat { syntax }), 3195 BOX_PAT => Pat::BoxPat(BoxPat { syntax }),
3196 DOT_DOT_PAT => Pat::DotDotPat(DotDotPat { syntax }), 3196 REST_PAT => Pat::RestPat(RestPat { syntax }),
3197 LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }), 3197 LITERAL_PAT => Pat::LiteralPat(LiteralPat { syntax }),
3198 MACRO_PAT => Pat::MacroPat(MacroPat { syntax }), 3198 MACRO_PAT => Pat::MacroPat(MacroPat { syntax }),
3199 OR_PAT => Pat::OrPat(OrPat { syntax }), 3199 OR_PAT => Pat::OrPat(OrPat { syntax }),
@@ -3214,7 +3214,7 @@ impl AstNode for Pat {
3214 match self { 3214 match self {
3215 Pat::IdentPat(it) => &it.syntax, 3215 Pat::IdentPat(it) => &it.syntax,
3216 Pat::BoxPat(it) => &it.syntax, 3216 Pat::BoxPat(it) => &it.syntax,
3217 Pat::DotDotPat(it) => &it.syntax, 3217 Pat::RestPat(it) => &it.syntax,
3218 Pat::LiteralPat(it) => &it.syntax, 3218 Pat::LiteralPat(it) => &it.syntax,
3219 Pat::MacroPat(it) => &it.syntax, 3219 Pat::MacroPat(it) => &it.syntax,
3220 Pat::OrPat(it) => &it.syntax, 3220 Pat::OrPat(it) => &it.syntax,
@@ -3990,7 +3990,7 @@ impl std::fmt::Display for BoxPat {
3990 std::fmt::Display::fmt(self.syntax(), f) 3990 std::fmt::Display::fmt(self.syntax(), f)
3991 } 3991 }
3992} 3992}
3993impl std::fmt::Display for DotDotPat { 3993impl std::fmt::Display for RestPat {
3994 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3994 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3995 std::fmt::Display::fmt(self.syntax(), f) 3995 std::fmt::Display::fmt(self.syntax(), f)
3996 } 3996 }