aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src/child_by_source.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2021-06-06 14:51:05 +0100
committerJonas Schievink <[email protected]>2021-06-06 16:03:37 +0100
commit8d87f9b298f41b8eb1e9fa0481c5092c1c136ef9 (patch)
treea594d707ee2b6fe6b49296ad02b72c02e494236c /crates/hir_def/src/child_by_source.rs
parent13da28cc2bc1b59f7af817eca36927a71edb023c (diff)
Handle attribute macros in `descend_into_macros`
Diffstat (limited to 'crates/hir_def/src/child_by_source.rs')
-rw-r--r--crates/hir_def/src/child_by_source.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/hir_def/src/child_by_source.rs b/crates/hir_def/src/child_by_source.rs
index f2e809ca9..f22383e22 100644
--- a/crates/hir_def/src/child_by_source.rs
+++ b/crates/hir_def/src/child_by_source.rs
@@ -85,6 +85,10 @@ impl ChildBySource for ItemScope {
85 res[keys::CONST].insert(src, konst); 85 res[keys::CONST].insert(src, konst);
86 }); 86 });
87 self.impls().for_each(|imp| add_impl(db, res, imp)); 87 self.impls().for_each(|imp| add_impl(db, res, imp));
88 self.attr_macro_invocs().for_each(|(ast_id, call_id)| {
89 let item = ast_id.with_value(ast_id.to_node(db.upcast()));
90 res[keys::ATTR_MACRO].insert(item, call_id);
91 });
88 92
89 fn add_module_def(db: &dyn DefDatabase, map: &mut DynMap, item: ModuleDefId) { 93 fn add_module_def(db: &dyn DefDatabase, map: &mut DynMap, item: ModuleDefId) {
90 match item { 94 match item {