Skip to content

Commit 45e6052

Browse files
committed
Remove dead code
1 parent c1e53d6 commit 45e6052

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

crates/ra_syntax/src/ast/generated/nodes.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,14 +1198,6 @@ impl TuplePat {
11981198
pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
11991199
}
12001200
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1201-
pub struct MacroDef {
1202-
pub(crate) syntax: SyntaxNode,
1203-
}
1204-
impl ast::NameOwner for MacroDef {}
1205-
impl MacroDef {
1206-
pub fn token_tree(&self) -> Option<TokenTree> { support::child(&self.syntax) }
1207-
}
1208-
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
12091201
pub struct MacroItems {
12101202
pub(crate) syntax: SyntaxNode,
12111203
}
@@ -2677,17 +2669,6 @@ impl AstNode for TuplePat {
26772669
}
26782670
fn syntax(&self) -> &SyntaxNode { &self.syntax }
26792671
}
2680-
impl AstNode for MacroDef {
2681-
fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_DEF }
2682-
fn cast(syntax: SyntaxNode) -> Option<Self> {
2683-
if Self::can_cast(syntax.kind()) {
2684-
Some(Self { syntax })
2685-
} else {
2686-
None
2687-
}
2688-
}
2689-
fn syntax(&self) -> &SyntaxNode { &self.syntax }
2690-
}
26912672
impl AstNode for MacroItems {
26922673
fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
26932674
fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -4015,11 +3996,6 @@ impl std::fmt::Display for TuplePat {
40153996
std::fmt::Display::fmt(self.syntax(), f)
40163997
}
40173998
}
4018-
impl std::fmt::Display for MacroDef {
4019-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
4020-
std::fmt::Display::fmt(self.syntax(), f)
4021-
}
4022-
}
40233999
impl std::fmt::Display for MacroItems {
40244000
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
40254001
std::fmt::Display::fmt(self.syntax(), f)

xtask/src/codegen/rust.ungram

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,6 @@ NameRef =
503503
MacroCall =
504504
Attr* Path '!' Name? TokenTree ';'?
505505

506-
MacroDef =
507-
Name TokenTree
508-
509506
TokenTree =
510507
'(' ')' | '{' '}' | '[' ']'
511508

0 commit comments

Comments
 (0)