mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Basic Support Macro 2.0
This commit is contained in:
parent
c8066ebd17
commit
a193666361
7 changed files with 209 additions and 63 deletions
|
@ -151,7 +151,7 @@ impl HirFileId {
|
|||
let def = loc.def.ast_id().left().and_then(|id| {
|
||||
let def_tt = match id.to_node(db) {
|
||||
ast::Macro::MacroRules(mac) => mac.token_tree()?,
|
||||
ast::Macro::MacroDef(_) => return None,
|
||||
ast::Macro::MacroDef(mac) => mac.body()?,
|
||||
};
|
||||
Some(InFile::new(id.file_id, def_tt))
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue