1
Fork 0

Only store a LocalDefId in hir::MacroDef.

This commit is contained in:
Camille GILLOT 2021-01-31 18:20:18 +01:00
parent ff14cac621
commit c4e7427081
16 changed files with 47 additions and 29 deletions

View file

@ -234,13 +234,13 @@ impl<'hir> LoweringContext<'_, 'hir> {
if let ItemKind::MacroDef(MacroDef { ref body, macro_rules }) = i.kind {
if !macro_rules || self.sess.contains_name(&i.attrs, sym::macro_export) {
let hir_id = self.lower_node_id(i.id);
let def_id = self.lower_node_id(i.id).expect_owner();
let body = P(self.lower_mac_args(body));
self.exported_macros.push(hir::MacroDef {
ident,
vis,
attrs,
hir_id,
def_id,
span: i.span,
ast: MacroDef { body, macro_rules },
});