about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2021-01-31 18:20:18 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2021-02-15 19:35:55 +0100
commitc4e74270819a7615a577c90f7616b422bc07eb21 (patch)
treecabc3f0b62857bf3b08522c711275eaa6505a5d0 /compiler/rustc_ast_lowering/src
parentff14cac621ce63d848abf615e45acd86fec32f50 (diff)
downloadrust-c4e74270819a7615a577c90f7616b422bc07eb21.tar.gz
rust-c4e74270819a7615a577c90f7616b422bc07eb21.zip
Only store a LocalDefId in hir::MacroDef.
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/item.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs
index 4a0c4459905..5a1754751bf 100644
--- a/compiler/rustc_ast_lowering/src/item.rs
+++ b/compiler/rustc_ast_lowering/src/item.rs
@@ -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 },
                 });