mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
show macros in file structure
This commit is contained in:
parent
5d829841cd
commit
46c453d0d3
2 changed files with 25 additions and 5 deletions
|
@ -142,6 +142,13 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
|
|||
};
|
||||
Some(node)
|
||||
})
|
||||
.visit(|mc: &ast::MacroCall| {
|
||||
let first_token = mc.syntax().first_token().unwrap();
|
||||
if first_token.text().as_str() != "macro_rules" {
|
||||
return None;
|
||||
}
|
||||
decl(mc)
|
||||
})
|
||||
.accept(node)?
|
||||
}
|
||||
|
||||
|
@ -177,6 +184,10 @@ impl E {}
|
|||
|
||||
impl fmt::Debug for E {}
|
||||
|
||||
macro_rules! mc {
|
||||
() => {}
|
||||
}
|
||||
|
||||
#[deprecated]
|
||||
fn obsolete() {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue