5630: Remove dead code r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-07-31 16:56:57 +00:00 committed by GitHub
commit 5cade89d73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 27 deletions

View file

@ -1246,14 +1246,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,
}
@ -2735,17 +2727,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> {
@ -4081,11 +4062,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

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