diff options
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_path.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_path.rs | 6 |
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 | } |