diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-19 14:17:05 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-19 14:17:05 +0100 |
commit | e8d266fa6dd7ee883d1bba52eb6a37c5e473978f (patch) | |
tree | 5ef5dceeeafb7105f41b6fe12bb1563f424f2e87 /crates/ide/src/completion/complete_dot.rs | |
parent | 422856d70f934b49f5b35043f3b51b6da08a61fa (diff) | |
parent | b9b4693ce3bf0229ea40f09e6404fad3e7823321 (diff) |
Merge #5814
5814: Add SelfParam to code_model
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide/src/completion/complete_dot.rs')
-rw-r--r-- | crates/ide/src/completion/complete_dot.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/completion/complete_dot.rs b/crates/ide/src/completion/complete_dot.rs index 532665285..5488db43f 100644 --- a/crates/ide/src/completion/complete_dot.rs +++ b/crates/ide/src/completion/complete_dot.rs | |||
@@ -48,7 +48,7 @@ fn complete_methods(acc: &mut Completions, ctx: &CompletionContext, receiver: &T | |||
48 | let mut seen_methods = FxHashSet::default(); | 48 | let mut seen_methods = FxHashSet::default(); |
49 | let traits_in_scope = ctx.scope.traits_in_scope(); | 49 | let traits_in_scope = ctx.scope.traits_in_scope(); |
50 | receiver.iterate_method_candidates(ctx.db, krate, &traits_in_scope, None, |_ty, func| { | 50 | receiver.iterate_method_candidates(ctx.db, krate, &traits_in_scope, None, |_ty, func| { |
51 | if func.has_self_param(ctx.db) | 51 | if func.self_param(ctx.db).is_some() |
52 | && ctx.scope.module().map_or(true, |m| func.is_visible_from(ctx.db, m)) | 52 | && ctx.scope.module().map_or(true, |m| func.is_visible_from(ctx.db, m)) |
53 | && seen_methods.insert(func.name(ctx.db)) | 53 | && seen_methods.insert(func.name(ctx.db)) |
54 | { | 54 | { |