Skip to content

Commit 2fbd52c

Browse files
committed
fix: Fix qualified path completion not completing macros
1 parent f87debc commit 2fbd52c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/ide_completion/src/completions/qualified_path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ pub(crate) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionCon
223223
});
224224
}
225225
}
226+
hir::PathResolution::Macro(mac) => acc.add_macro(ctx, None, mac),
226227
_ => {}
227228
}
228229
}

crates/ide_completion/src/tests/use_tree.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,14 @@ use foo::$0
122122
mod foo {
123123
struct Private;
124124
pub struct Foo;
125+
macro_rules! foo_ { {} => {} }
126+
pub use foo_ as foo;
125127
}
126128
struct Bar;
127129
"#,
128130
expect![[r#"
129131
st Foo
132+
ma foo! macro_rules! foo_
130133
"#]],
131134
);
132135
}

0 commit comments

Comments
 (0)