mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
fix symbol index collection not collecting legacy macros
This commit is contained in:
parent
4e94fb7028
commit
f9c8646d89
4 changed files with 260 additions and 251 deletions
|
@ -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>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue