From c1cb5953820f26d4d0a614650bc8c50cbc5a3ce6 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Tue, 15 Dec 2020 15:37:37 +0100 Subject: Move to upstream `macro_rules!` model --- crates/syntax/src/ast/node_ext.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'crates/syntax/src/ast/node_ext.rs') diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index 820af2d20..c59a29eab 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs @@ -382,21 +382,6 @@ impl ast::Visibility { } } -impl ast::MacroCall { - pub fn is_macro_rules(&self) -> Option { - let name_ref = self.path()?.segment()?.name_ref()?; - if name_ref.text() == "macro_rules" { - self.name() - } else { - None - } - } - - pub fn is_bang(&self) -> bool { - self.is_macro_rules().is_none() - } -} - impl ast::LifetimeParam { pub fn lifetime_bounds(&self) -> impl Iterator { self.syntax() @@ -476,5 +461,5 @@ impl ast::DocCommentsOwner for ast::Static {} impl ast::DocCommentsOwner for ast::Const {} impl ast::DocCommentsOwner for ast::TypeAlias {} impl ast::DocCommentsOwner for ast::Impl {} -impl ast::DocCommentsOwner for ast::MacroCall {} +impl ast::DocCommentsOwner for ast::MacroRules {} impl ast::DocCommentsOwner for ast::Use {} -- cgit v1.2.3