From 76f2b9d2ef797fb995f1bd2706a7e609d014a67a Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Mon, 4 Jan 2021 10:53:31 +0800 Subject: Proper handling $crate Take 2 --- crates/hir_def/src/path/lower.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_def/src/path') diff --git a/crates/hir_def/src/path/lower.rs b/crates/hir_def/src/path/lower.rs index 8a01e6eea..9518ac109 100644 --- a/crates/hir_def/src/path/lower.rs +++ b/crates/hir_def/src/path/lower.rs @@ -123,7 +123,7 @@ pub(super) fn lower_path(mut path: ast::Path, hygiene: &Hygiene) -> Option // We follow what it did anyway :) if segments.len() == 1 && kind == PathKind::Plain { if let Some(_macro_call) = path.syntax().parent().and_then(ast::MacroCall::cast) { - if let Some(crate_id) = hygiene.local_inner_macros() { + if let Some(crate_id) = hygiene.local_inner_macros(path) { kind = PathKind::DollarCrate(crate_id); } } -- cgit v1.2.3