fix symbol index collection not collecting legacy macros

This commit is contained in:
Lukas Wirth 2022-03-09 01:44:20 +01:00
parent 4e94fb7028
commit f9c8646d89
4 changed files with 260 additions and 251 deletions

View file

@ -174,6 +174,13 @@ impl<'a> SymbolCollector<'a> {
for const_id in scope.unnamed_consts() {
self.collect_from_body(const_id);
}
for (_, id) in scope.legacy_macros() {
let loc = id.lookup(self.db.upcast());
if loc.container == module_id {
self.push_decl(id, FileSymbolKind::Macro);
}
}
}
fn collect_from_body(&mut self, body_id: impl Into<DefWithBodyId>) {