1
Fork 0

Treat macros as HIR items

This commit is contained in:
inquisitivecrystal 2021-07-30 23:50:57 -07:00
parent ac50a53359
commit 8c62fa0575
31 changed files with 162 additions and 256 deletions

View file

@ -642,6 +642,11 @@ impl<'a> State<'a> {
self.end(); // need to close a box
self.ann.nested(self, Nested::Body(body));
}
hir::ItemKind::Macro(ref macro_def) => {
self.print_mac_def(macro_def, &item.ident, &item.span, |state| {
state.print_visibility(&item.vis)
});
}
hir::ItemKind::Mod(ref _mod) => {
self.head(visibility_qualified(&item.vis, "mod"));
self.print_ident(item.ident);