aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_path.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 16:20:31 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-15 16:20:31 +0000
commit323938dae58576f5fa86ddebf88fdcb5b09662ed (patch)
treedfeae99da99f6f9b2d91d31f84c0a3b527cfffbe /crates/ra_ide_api/src/completion/complete_path.rs
parent72a4951023f11adfdf0eac353c99d8a01a9471fc (diff)
parentfafcd103d26821a8408572514201a40765bb2d2b (diff)
Merge #555
555: remove Cancelable from ids r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_path.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index 207a509b3..42468681a 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -8,13 +8,13 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> C
8 (Some(path), Some(module)) => (path.clone(), module), 8 (Some(path), Some(module)) => (path.clone(), module),
9 _ => return Ok(()), 9 _ => return Ok(()),
10 }; 10 };
11 let def_id = match module.resolve_path(ctx.db, &path)?.take_types() { 11 let def_id = match module.resolve_path(ctx.db, &path).take_types() {
12 Some(it) => it, 12 Some(it) => it,
13 None => return Ok(()), 13 None => return Ok(()),
14 }; 14 };
15 match def_id.resolve(ctx.db) { 15 match def_id.resolve(ctx.db) {
16 hir::Def::Module(module) => { 16 hir::Def::Module(module) => {
17 let module_scope = module.scope(ctx.db)?; 17 let module_scope = module.scope(ctx.db);
18 for (name, res) in module_scope.entries() { 18 for (name, res) in module_scope.entries() {
19 CompletionItem::new(CompletionKind::Reference, name.to_string()) 19 CompletionItem::new(CompletionKind::Reference, name.to_string())
20 .from_resolution(ctx, res) 20 .from_resolution(ctx, res)