aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/complete_path.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_path.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_path.rs')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index 5d974cf6d..802c7701a 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -53,8 +53,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
53 ctx.analyzer.iterate_path_candidates(ctx.db, ty.clone(), None, |_ty, item| { 53 ctx.analyzer.iterate_path_candidates(ctx.db, ty.clone(), None, |_ty, item| {
54 match item { 54 match item {
55 hir::AssocItem::Function(func) => { 55 hir::AssocItem::Function(func) => {
56 let data = func.data(ctx.db); 56 if !func.has_self_param(ctx.db) {
57 if !data.has_self_param() {
58 acc.add_function(ctx, func); 57 acc.add_function(ctx, func);
59 } 58 }
60 } 59 }
@@ -80,8 +79,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
80 for item in t.items(ctx.db) { 79 for item in t.items(ctx.db) {
81 match item { 80 match item {
82 hir::AssocItem::Function(func) => { 81 hir::AssocItem::Function(func) => {
83 let data = func.data(ctx.db); 82 if !func.has_self_param(ctx.db) {
84 if !data.has_self_param() {
85 acc.add_function(ctx, func); 83 acc.add_function(ctx, func);
86 } 84 }
87 } 85 }