mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +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
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue