Handle attribute macros in descend_into_macros

This commit is contained in:
Jonas Schievink 2021-06-06 15:51:05 +02:00
parent 13da28cc2b
commit 8d87f9b298
6 changed files with 86 additions and 22 deletions

View file

@ -85,6 +85,10 @@ impl ChildBySource for ItemScope {
res[keys::CONST].insert(src, konst);
});
self.impls().for_each(|imp| add_impl(db, res, imp));
self.attr_macro_invocs().for_each(|(ast_id, call_id)| {
let item = ast_id.with_value(ast_id.to_node(db.upcast()));
res[keys::ATTR_MACRO].insert(item, call_id);
});
fn add_module_def(db: &dyn DefDatabase, map: &mut DynMap, item: ModuleDefId) {
match item {