1
Fork 0

resolve/expand: Improve attribute expansion on macro definitions and calls

This commit is contained in:
Vadim Petrochenkov 2020-12-31 17:59:09 +03:00
parent 46c35c76fe
commit d81c1946c6
8 changed files with 63 additions and 40 deletions

View file

@ -91,7 +91,10 @@ impl<'a, 'b> visit::Visitor<'a> for DefCollector<'a, 'b> {
DefPathData::ValueNs(i.ident.name)
}
ItemKind::MacroDef(..) => DefPathData::MacroNs(i.ident.name),
ItemKind::MacCall(..) => return self.visit_macro_invoc(i.id),
ItemKind::MacCall(..) => {
visit::walk_item(self, i);
return self.visit_macro_invoc(i.id);
}
ItemKind::GlobalAsm(..) => DefPathData::Misc,
ItemKind::Use(..) => {
return visit::walk_item(self, i);