Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_completion/src/completions/attribute.rs')
-rw-r--r--crates/ide_completion/src/completions/attribute.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_completion/src/completions/attribute.rs b/crates/ide_completion/src/completions/attribute.rs
index eb287847be..3c5dd8f3fd 100644
--- a/crates/ide_completion/src/completions/attribute.rs
+++ b/crates/ide_completion/src/completions/attribute.rs
@@ -93,7 +93,7 @@ pub(crate) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext)
};
for (name, def) in module.scope(ctx.db, ctx.module) {
- if let Some(def) = module_or_attr(def) {
+ if let Some(def) = module_or_attr(ctx.db, def) {
acc.add_resolution(ctx, name, def);
}
}
@@ -104,7 +104,7 @@ pub(crate) fn complete_attribute(acc: &mut Completions, ctx: &CompletionContext)
// only show modules in a fresh UseTree
None => {
ctx.process_all_names(&mut |name, def| {
- if let Some(def) = module_or_attr(def) {
+ if let Some(def) = module_or_attr(ctx.db, def) {
acc.add_resolution(ctx, name, def);
}
});