aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-29 16:35:05 +0100
committerAleksey Kladov <[email protected]>2020-07-29 16:35:12 +0100
commit0d1357be0515cf14bbca3577715b68794a7637b2 (patch)
tree8c8ef7e8dd61e79af322880292957c2cb5ca7289
parent9110e3b67f8403f453247a12ad878b6c92c3d3d3 (diff)
Dead code
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs41
-rw-r--r--xtask/src/ast_src.rs8
2 files changed, 0 insertions, 49 deletions
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index df9b5cc2c..1fe5f450a 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -1710,7 +1710,6 @@ pub struct RecordFieldPatList {
1710} 1710}
1711impl RecordFieldPatList { 1711impl RecordFieldPatList {
1712 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) } 1712 pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
1713 pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) }
1714 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> { 1713 pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> {
1715 support::children(&self.syntax) 1714 support::children(&self.syntax)
1716 } 1715 }
@@ -2721,13 +2720,6 @@ pub enum Pat {
2721 LiteralPat(LiteralPat), 2720 LiteralPat(LiteralPat),
2722 MacroPat(MacroPat), 2721 MacroPat(MacroPat),
2723} 2722}
2724/// Any kind of pattern that appears directly inside of the curly
2725/// braces of a record pattern
2726#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2727pub enum RecordInnerPat {
2728 RecordFieldPat(RecordFieldPat),
2729 BindPat(BindPat),
2730}
2731/// Any kind of input to an attribute 2723/// Any kind of input to an attribute
2732#[derive(Debug, Clone, PartialEq, Eq, Hash)] 2724#[derive(Debug, Clone, PartialEq, Eq, Hash)]
2733pub enum AttrInput { 2725pub enum AttrInput {
@@ -4693,34 +4685,6 @@ impl AstNode for Pat {
4693 } 4685 }
4694 } 4686 }
4695} 4687}
4696impl From<RecordFieldPat> for RecordInnerPat {
4697 fn from(node: RecordFieldPat) -> RecordInnerPat { RecordInnerPat::RecordFieldPat(node) }
4698}
4699impl From<BindPat> for RecordInnerPat {
4700 fn from(node: BindPat) -> RecordInnerPat { RecordInnerPat::BindPat(node) }
4701}
4702impl AstNode for RecordInnerPat {
4703 fn can_cast(kind: SyntaxKind) -> bool {
4704 match kind {
4705 RECORD_FIELD_PAT | BIND_PAT => true,
4706 _ => false,
4707 }
4708 }
4709 fn cast(syntax: SyntaxNode) -> Option<Self> {
4710 let res = match syntax.kind() {
4711 RECORD_FIELD_PAT => RecordInnerPat::RecordFieldPat(RecordFieldPat { syntax }),
4712 BIND_PAT => RecordInnerPat::BindPat(BindPat { syntax }),
4713 _ => return None,
4714 };
4715 Some(res)
4716 }
4717 fn syntax(&self) -> &SyntaxNode {
4718 match self {
4719 RecordInnerPat::RecordFieldPat(it) => &it.syntax,
4720 RecordInnerPat::BindPat(it) => &it.syntax,
4721 }
4722 }
4723}
4724impl From<Literal> for AttrInput { 4688impl From<Literal> for AttrInput {
4725 fn from(node: Literal) -> AttrInput { AttrInput::Literal(node) } 4689 fn from(node: Literal) -> AttrInput { AttrInput::Literal(node) }
4726} 4690}
@@ -4847,11 +4811,6 @@ impl std::fmt::Display for Pat {
4847 std::fmt::Display::fmt(self.syntax(), f) 4811 std::fmt::Display::fmt(self.syntax(), f)
4848 } 4812 }
4849} 4813}
4850impl std::fmt::Display for RecordInnerPat {
4851 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4852 std::fmt::Display::fmt(self.syntax(), f)
4853 }
4854}
4855impl std::fmt::Display for AttrInput { 4814impl std::fmt::Display for AttrInput {
4856 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 4815 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4857 std::fmt::Display::fmt(self.syntax(), f) 4816 std::fmt::Display::fmt(self.syntax(), f)
diff --git a/xtask/src/ast_src.rs b/xtask/src/ast_src.rs
index 7f0db31bd..a6a4d7c35 100644
--- a/xtask/src/ast_src.rs
+++ b/xtask/src/ast_src.rs
@@ -1479,7 +1479,6 @@ pub(crate) fn rust_ast() -> AstSrc {
1479 /// [Reference](https://doc.rust-lang.org/reference/patterns.html#struct-patterns) 1479 /// [Reference](https://doc.rust-lang.org/reference/patterns.html#struct-patterns)
1480 struct RecordFieldPatList { 1480 struct RecordFieldPatList {
1481 T!['{'], 1481 T!['{'],
1482 pats: [RecordInnerPat],
1483 record_field_pats: [RecordFieldPat], 1482 record_field_pats: [RecordFieldPat],
1484 bind_pats: [BindPat], 1483 bind_pats: [BindPat],
1485 T![..], 1484 T![..],
@@ -2213,13 +2212,6 @@ pub(crate) fn rust_ast() -> AstSrc {
2213 MacroPat, 2212 MacroPat,
2214 } 2213 }
2215 2214
2216 /// Any kind of pattern that appears directly inside of the curly
2217 /// braces of a record pattern
2218 enum RecordInnerPat {
2219 RecordFieldPat,
2220 BindPat
2221 }
2222
2223 /// Any kind of input to an attribute 2215 /// Any kind of input to an attribute
2224 enum AttrInput { Literal, TokenTree } 2216 enum AttrInput { Literal, TokenTree }
2225 2217