aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_dot.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-22 14:43:32 +0000
committerGitHub <[email protected]>2019-11-22 14:43:32 +0000
commitb841c53a0c93cdca3f08b1c917c9fa8a63d31604 (patch)
tree2b1d06598328b9d1922e83c791f181b5789eb789 /crates/ra_ide_api/src/completion/complete_dot.rs
parenta132cc715ed05cab83fd058156eb152f0be96982 (diff)
parent64df759418a83fd05fab850b8351fcddbdd3ef63 (diff)
Merge #2356
2356: Move FunctionData to hir_def r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_dot.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_dot.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs
index 4e2c497e1..5a3f9b5f6 100644
--- a/crates/ra_ide_api/src/completion/complete_dot.rs
+++ b/crates/ra_ide_api/src/completion/complete_dot.rs
@@ -59,8 +59,7 @@ fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty)
59fn complete_methods(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) { 59fn complete_methods(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) {
60 let mut seen_methods = FxHashSet::default(); 60 let mut seen_methods = FxHashSet::default();
61 ctx.analyzer.iterate_method_candidates(ctx.db, receiver, None, |_ty, func| { 61 ctx.analyzer.iterate_method_candidates(ctx.db, receiver, None, |_ty, func| {
62 let data = func.data(ctx.db); 62 if func.has_self_param(ctx.db) && seen_methods.insert(func.name(ctx.db)) {
63 if data.has_self_param() && seen_methods.insert(data.name().clone()) {
64 acc.add_function(ctx, func); 63 acc.add_function(ctx, func);
65 } 64 }
66 None::<()> 65 None::<()>