aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-07 18:41:07 +0000
committerGitHub <[email protected]>2020-12-07 18:41:07 +0000
commit8a950dfb406a927085602af016855cfe1988aee1 (patch)
treefe5b3a2b6d3bd65f0b34e871dacde546a70b5395
parentbb1002b8b122ec4aaf8fcd9325e5441e4e3e36e6 (diff)
parent881c7a680b689adf54f0ab82f91e4b315ef7b3d8 (diff)
Merge #6751
6751: Use the right `def_crate` for builtin macros r=jonas-schievink a=jonas-schievink Fixes the incorrect macro resolution in https://github.com/rust-analyzer/rust-analyzer/issues/6716 No test, because diagnostics do not get remapped correctly for some reason. I've checked manually that this fixes the resolution errors. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
-rw-r--r--crates/hir_expand/src/hygiene.rs2
1 files changed, 1 insertions, 1 deletions
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 {
30 let loc = db.lookup_intern_macro(id); 30 let loc = db.lookup_intern_macro(id);
31 match loc.def.kind { 31 match loc.def.kind {
32 MacroDefKind::Declarative => (loc.def.krate, loc.def.local_inner), 32 MacroDefKind::Declarative => (loc.def.krate, loc.def.local_inner),
33 MacroDefKind::BuiltIn(_) => (None, false), 33 MacroDefKind::BuiltIn(_) => (loc.def.krate, false),
34 MacroDefKind::BuiltInDerive(_) => (None, false), 34 MacroDefKind::BuiltInDerive(_) => (None, false),
35 MacroDefKind::BuiltInEager(_) => (None, false), 35 MacroDefKind::BuiltInEager(_) => (None, false),
36 MacroDefKind::ProcMacro(_) => (None, false), 36 MacroDefKind::ProcMacro(_) => (None, false),