diff --git a/crates/ide/src/syntax_highlighting/test_data/highlighting.html b/crates/ide/src/syntax_highlighting/test_data/highlighting.html
index 185f137b8a..d7f996fba9 100644
--- a/crates/ide/src/syntax_highlighting/test_data/highlighting.html
+++ b/crates/ide/src/syntax_highlighting/test_data/highlighting.html
@@ -56,7 +56,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
pub trait Fn<Args>: FnMut<Args> {}
}
-proc_macros::mirror! {
+proc_macros::mirror! {
{
,i32 :x pub
,i32 :y pub
diff --git a/crates/ide_db/src/defs.rs b/crates/ide_db/src/defs.rs
index b5a13cea91..ffef33b6c8 100644
--- a/crates/ide_db/src/defs.rs
+++ b/crates/ide_db/src/defs.rs
@@ -416,10 +416,10 @@ impl NameRefClass {
}
if let Some(path) = ast::PathSegment::cast(parent.clone()).map(|it| it.parent_path()) {
- if path.qualifier().is_none() {
+ if path.parent_path().is_none() {
if let Some(macro_call) = path.syntax().parent().and_then(ast::MacroCall::cast) {
- // Only use this to resolve single-segment macro calls like `foo!()`. Multi-segment
- // paths are handled below (allowing `log$0::info!` to resolve to the log crate).
+ // Only use this to resolve to macro calls for last segments as qualifiers resolve
+ // to modules below.
if let Some(macro_def) = sema.resolve_macro_call(¯o_call) {
return Some(NameRefClass::Definition(Definition::Macro(macro_def)));
}