mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
Merge #5630
5630: Remove dead code r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
5cade89d73
2 changed files with 0 additions and 27 deletions
|
@ -1246,14 +1246,6 @@ impl TuplePat {
|
||||||
pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
|
pub fn r_paren_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![')']) }
|
||||||
}
|
}
|
||||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
#[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 struct MacroItems {
|
||||||
pub(crate) syntax: SyntaxNode,
|
pub(crate) syntax: SyntaxNode,
|
||||||
}
|
}
|
||||||
|
@ -2735,17 +2727,6 @@ impl AstNode for TuplePat {
|
||||||
}
|
}
|
||||||
fn syntax(&self) -> &SyntaxNode { &self.syntax }
|
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 {
|
impl AstNode for MacroItems {
|
||||||
fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
|
fn can_cast(kind: SyntaxKind) -> bool { kind == MACRO_ITEMS }
|
||||||
fn cast(syntax: SyntaxNode) -> Option<Self> {
|
fn cast(syntax: SyntaxNode) -> Option<Self> {
|
||||||
|
@ -4081,11 +4062,6 @@ impl std::fmt::Display for TuplePat {
|
||||||
std::fmt::Display::fmt(self.syntax(), f)
|
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 {
|
impl std::fmt::Display for MacroItems {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
std::fmt::Display::fmt(self.syntax(), f)
|
std::fmt::Display::fmt(self.syntax(), f)
|
||||||
|
|
|
@ -539,9 +539,6 @@ NameRef =
|
||||||
MacroCall =
|
MacroCall =
|
||||||
Attr* Path '!' Name? TokenTree ';'?
|
Attr* Path '!' Name? TokenTree ';'?
|
||||||
|
|
||||||
MacroDef =
|
|
||||||
Name TokenTree
|
|
||||||
|
|
||||||
TokenTree =
|
TokenTree =
|
||||||
'(' ')' | '{' '}' | '[' ']'
|
'(' ')' | '{' '}' | '[' ']'
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue