mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
internal: Record all macro definitions in ItemScope
This commit is contained in:
parent
cd42b20ce3
commit
db49ac8734
9 changed files with 57 additions and 27 deletions
|
@ -508,8 +508,13 @@ impl Scope {
|
|||
m.def_map[m.module_id].scope.entries().for_each(|(name, def)| {
|
||||
acc.add_per_ns(name, def);
|
||||
});
|
||||
m.def_map[m.module_id].scope.legacy_macros().for_each(|(name, mac)| {
|
||||
acc.add(name, ScopeDef::ModuleDef(ModuleDefId::MacroId(MacroId::from(mac))));
|
||||
m.def_map[m.module_id].scope.legacy_macros().for_each(|(name, macs)| {
|
||||
macs.iter().for_each(|&mac| {
|
||||
acc.add(
|
||||
name,
|
||||
ScopeDef::ModuleDef(ModuleDefId::MacroId(MacroId::from(mac))),
|
||||
);
|
||||
})
|
||||
});
|
||||
m.def_map.extern_prelude().for_each(|(name, &def)| {
|
||||
acc.add(name, ScopeDef::ModuleDef(ModuleDefId::ModuleId(def)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue