From 881c7a680b689adf54f0ab82f91e4b315ef7b3d8 Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Mon, 7 Dec 2020 19:37:38 +0100 Subject: [PATCH] Use the right `def_crate` for builtin macros --- crates/hir_expand/src/hygiene.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/hir_expand/src/hygiene.rs b/crates/hir_expand/src/hygiene.rs index d383b968da..5d3fa0518f 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),