mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-12 13:28:13 +00:00
Move to upstream macro_rules!
model
This commit is contained in:
parent
39aae835fd
commit
c1cb595382
36 changed files with 325 additions and 275 deletions
|
@ -382,21 +382,6 @@ impl ast::Visibility {
|
|||
}
|
||||
}
|
||||
|
||||
impl ast::MacroCall {
|
||||
pub fn is_macro_rules(&self) -> Option<ast::Name> {
|
||||
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<Item = SyntaxToken> {
|
||||
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 {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue