Remove dead code

This commit is contained in:
Aleksey Kladov 2020-07-31 18:53:10 +02:00
parent c1e53d668f
commit 45e6052406
2 changed files with 0 additions and 27 deletions

View file

@ -1198,14 +1198,6 @@ impl TuplePat {
pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct MacroDef {
pub(crate) syntax: SyntaxNode,
}
impl ast::NameOwner for MacroDef {}
impl MacroDef {
pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
}
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct MacroItems {
pub(crate) syntax: SyntaxNode,
}
@ -2677,17 +2669,6 @@ impl AstNode for TuplePat {
}
fn syntax(&self) -> &SyntaxNode { &self.syntax }
}
impl AstNode for MacroDef {
fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF }
fn cast(syntax: SyntaxNode) -> Option<Self> {
if Self::can_cast(syntax.kind()) {
Some(Self { syntax })
} else {
None
}
}
fn syntax(&self) -> &SyntaxNode { &self.syntax }
}
impl AstNode for MacroItems {
fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
fn cast(syntax: SyntaxNode) -> Option<Self> {
@ -4015,11 +3996,6 @@ impl std::fmt::Display for TuplePat {
std::fmt::Display::fmt(self.syntax(), f)
}
}
impl std::fmt::Display for MacroDef {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self.syntax(), f)
}
}
impl std::fmt::Display for MacroItems {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
std::fmt::Display::fmt(self.syntax(), f)

View file

@ -503,9 +503,6 @@ NameRef =
MacroCall =
Attr* Path '!' Name? TokenTree ';'?
MacroDef =
Name TokenTree
TokenTree =
'(' ')' | '{' '}' | '[' ']'