aboutsummaryrefslogtreecommitdiff
path: root/crates
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 /crates
parent9110e3b67f8403f453247a12ad878b6c92c3d3d3 (diff)
Dead code
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs41
1 files changed, 0 insertions, 41 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)