diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_scope.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_scope.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs index eeaf26d93..b44b943ae 100644 --- a/crates/ra_ide_api/src/completion/complete_scope.rs +++ b/crates/ra_ide_api/src/completion/complete_scope.rs | |||
@@ -1,4 +1,4 @@ | |||
1 | use crate::completion::{CompletionItem, Completions, CompletionKind, CompletionContext}; | 1 | use crate::completion::{Completions, CompletionContext}; |
2 | 2 | ||
3 | pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) { | 3 | pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) { |
4 | if !ctx.is_trivial_path { | 4 | if !ctx.is_trivial_path { |
@@ -6,11 +6,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) { | |||
6 | } | 6 | } |
7 | let names = ctx.resolver.all_names(ctx.db); | 7 | let names = ctx.resolver.all_names(ctx.db); |
8 | 8 | ||
9 | names.into_iter().for_each(|(name, res)| { | 9 | names.into_iter().for_each(|(name, res)| acc.add_resolution(ctx, name.to_string(), &res)); |
10 | CompletionItem::new(CompletionKind::Reference, ctx.source_range(), name.to_string()) | ||
11 | .from_resolution(ctx, &res) | ||
12 | .add_to(acc) | ||
13 | }); | ||
14 | } | 10 | } |
15 | 11 | ||
16 | #[cfg(test)] | 12 | #[cfg(test)] |