From 881c7a680b689adf54f0ab82f91e4b315ef7b3d8 Mon Sep 17 00:00:00 2001
From: Jonas Schievink <jonasschievink@gmail.com>
Date: Mon, 7 Dec 2020 19:37:38 +0100
Subject: Use the right `def_crate` for builtin macros

---
 crates/hir_expand/src/hygiene.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'crates/hir_expand')

diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs
index d383b968d..5d3fa0518 100644
--- a/crates/hir_expand/src/hygiene.rs
+++ b/crates/hir_expand/src/hygiene.rs
@@ -30,7 +30,7 @@ impl Hygiene {
                     let loc = db.lookup_intern_macro(id);
                     match loc.def.kind {
                         MacroDefKind::Declarative => (loc.def.krate, loc.def.local_inner),
-                        MacroDefKind::BuiltIn(_) => (None, false),
+                        MacroDefKind::BuiltIn(_) => (loc.def.krate, false),
                         MacroDefKind::BuiltInDerive(_) => (None, false),
                         MacroDefKind::BuiltInEager(_) => (None, false),
                         MacroDefKind::ProcMacro(_) => (None, false),
-- 
cgit v1.2.3