internal: Record all macro definitions in ItemScope

This commit is contained in:
Lukas Wirth 2022-07-05 11:28:47 +02:00
parent cd42b20ce3
commit db49ac8734
9 changed files with 57 additions and 27 deletions

View file

@ -559,7 +559,7 @@ impl Module {
pub fn legacy_macros(self, db: &dyn HirDatabase) -> Vec<Macro> {
let def_map = self.id.def_map(db.upcast());
let scope = &def_map[self.id.local_id].scope;
scope.legacy_macros().map(|(_, it)| MacroId::from(it).into()).collect()
scope.legacy_macros().flat_map(|(_, it)| it).map(|&it| MacroId::from(it).into()).collect()
}
pub fn impl_defs(self, db: &dyn HirDatabase) -> Vec<Impl> {