mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
fix: properly import all types of macros with #[macro_use] again
This commit is contained in:
parent
0b3daef537
commit
18ad750786
5 changed files with 59 additions and 20 deletions
|
@ -103,9 +103,11 @@ impl ChildBySource for ItemScope {
|
|||
},
|
||||
);
|
||||
self.legacy_macros().for_each(|(_, id)| {
|
||||
let loc = id.lookup(db);
|
||||
if loc.id.file_id() == file_id {
|
||||
res[keys::MACRO_RULES].insert(loc.source(db).value, id);
|
||||
if let MacroId::MacroRulesId(id) = id {
|
||||
let loc = id.lookup(db);
|
||||
if loc.id.file_id() == file_id {
|
||||
res[keys::MACRO_RULES].insert(loc.source(db).value, id);
|
||||
}
|
||||
}
|
||||
});
|
||||
self.derive_macro_invocs().filter(|(id, _)| id.file_id == file_id).for_each(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue