Dead code
This commit is contained in:
parent
9110e3b67f
commit
0d1357be05
@ -1710,7 +1710,6 @@ pub struct RecordFieldPatList {
|
||||
}
|
||||
impl RecordFieldPatList {
|
||||
pub fn l_curly_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T!['{']) }
|
||||
pub fn pats(&self) -> AstChildren<RecordInnerPat> { support::children(&self.syntax) }
|
||||
pub fn record_field_pats(&self) -> AstChildren<RecordFieldPat> {
|
||||
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 @@ fn syntax(&self) -> &SyntaxNode {
|
||||
}
|
||||
}
|
||||
}
|
||||
impl From<RecordFieldPat> for RecordInnerPat {
|
||||
fn from(node: RecordFieldPat) -> RecordInnerPat { RecordInnerPat::RecordFieldPat(node) }
|
||||
}
|
||||
impl From<BindPat> 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<Self> {
|
||||
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<Literal> for AttrInput {
|
||||
fn from(node: Literal) -> AttrInput { AttrInput::Literal(node) }
|
||||
}
|
||||
@ -4847,11 +4811,6 @@ fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
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)
|
||||
|
@ -1479,7 +1479,6 @@ struct RecordPat { RecordFieldPatList, Path }
|
||||
/// [Reference](https://doc.rust-lang.org/reference/patterns.html#struct-patterns)
|
||||
struct RecordFieldPatList {
|
||||
T!['{'],
|
||||
pats: [RecordInnerPat],
|
||||
record_field_pats: [RecordFieldPat],
|
||||
bind_pats: [BindPat],
|
||||
T![..],
|
||||
@ -2213,13 +2212,6 @@ enum Pat {
|
||||
MacroPat,
|
||||
}
|
||||
|
||||
/// Any kind of pattern that appears directly inside of the curly
|
||||
/// braces of a record pattern
|
||||
enum RecordInnerPat {
|
||||
RecordFieldPat,
|
||||
BindPat
|
||||
}
|
||||
|
||||
/// Any kind of input to an attribute
|
||||
enum AttrInput { Literal, TokenTree }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user