From 0d1357be0515cf14bbca3577715b68794a7637b2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 Jul 2020 17:35:05 +0200 Subject: Dead code --- crates/ra_syntax/src/ast/generated/nodes.rs | 41 ----------------------------- 1 file changed, 41 deletions(-) (limited to 'crates') 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 { } impl RecordFieldPatList { pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } - pub fn pats(&self) -> AstChildren { support::children(&self.syntax) } pub fn record_field_pats(&self) -> AstChildren { support::children(&self.syntax) } @@ -2721,13 +2720,6 @@ pub enum Pat { LiteralPat(LiteralPat), MacroPat(MacroPat), } -/// Any kind of pattern that appears directly inside of the curly -/// braces of a record pattern -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum RecordInnerPat { - RecordFieldPat(RecordFieldPat), - BindPat(BindPat), -} /// Any kind of input to an attribute #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum AttrInput { @@ -4693,34 +4685,6 @@ impl AstNode for Pat { } } } -impl From for RecordInnerPat { - fn from(node: RecordFieldPat) -> RecordInnerPat { RecordInnerPat::RecordFieldPat(node) } -} -impl From for RecordInnerPat { - fn from(node: BindPat) -> RecordInnerPat { RecordInnerPat::BindPat(node) } -} -impl AstNode for RecordInnerPat { - fn can_cast(kind: SyntaxKind) -> bool { - match kind { - RECORD_FIELD_PAT | BIND_PAT => true, - _ => false, - } - } - fn cast(syntax: SyntaxNode) -> Option { - let res = match syntax.kind() { - RECORD_FIELD_PAT => RecordInnerPat::RecordFieldPat(RecordFieldPat { syntax }), - BIND_PAT => RecordInnerPat::BindPat(BindPat { syntax }), - _ => return None, - }; - Some(res) - } - fn syntax(&self) -> &SyntaxNode { - match self { - RecordInnerPat::RecordFieldPat(it) => &it.syntax, - RecordInnerPat::BindPat(it) => &it.syntax, - } - } -} impl From for AttrInput { fn from(node: Literal) -> AttrInput { AttrInput::Literal(node) } } @@ -4847,11 +4811,6 @@ impl std::fmt::Display for Pat { std::fmt::Display::fmt(self.syntax(), f) } } -impl std::fmt::Display for RecordInnerPat { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - std::fmt::Display::fmt(self.syntax(), f) - } -} impl std::fmt::Display for AttrInput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Display::fmt(self.syntax(), f) -- cgit v1.2.3