Only store a LocalDefId in hir::MacroDef.
This commit is contained in:
parent
ff14cac621
commit
c4e7427081
16 changed files with 47 additions and 29 deletions
|
@ -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 },
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue