Skip to content

Commit 8a950df

Browse files
Merge #6751
6751: Use the right `def_crate` for builtin macros r=jonas-schievink a=jonas-schievink Fixes the incorrect macro resolution in #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]>
2 parents bb1002b + 881c7a6 commit 8a950df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/hir_expand/src/hygiene.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Hygiene {
3030
let loc = db.lookup_intern_macro(id);
3131
match loc.def.kind {
3232
MacroDefKind::Declarative => (loc.def.krate, loc.def.local_inner),
33-
MacroDefKind::BuiltIn(_) => (None, false),
33+
MacroDefKind::BuiltIn(_) => (loc.def.krate, false),
3434
MacroDefKind::BuiltInDerive(_) => (None, false),
3535
MacroDefKind::BuiltInEager(_) => (None, false),
3636
MacroDefKind::ProcMacro(_) => (None, false),

0 commit comments

Comments
 (0)