diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-17 22:16:28 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-17 22:16:28 +0100 |
commit | 54379ec6f8f82a470a275771e70825634d3d553b (patch) | |
tree | 498719aafe633f9eb9cb65ba65932076981e4632 /crates/ra_ide_api/src/completion | |
parent | d505ee968b2a99eed65dfe7be27940ad9b2647c1 (diff) | |
parent | c2f9558e1af8dbf73ff86eeffcb9ea6940947dd6 (diff) |
Merge #1862
1862: Assoc item resolution refactoring (again) r=flodiebold a=flodiebold
This is #1849, with the associated type selection code removed for now. Handling cycles there will need some more thought.
Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_path.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index e1c8d6ab0..e9fec54d8 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs | |||
@@ -52,14 +52,14 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { | |||
52 | if let Some(krate) = krate { | 52 | if let Some(krate) = krate { |
53 | ty.iterate_impl_items(ctx.db, krate, |item| { | 53 | ty.iterate_impl_items(ctx.db, krate, |item| { |
54 | match item { | 54 | match item { |
55 | hir::ImplItem::Method(func) => { | 55 | hir::AssocItem::Function(func) => { |
56 | let data = func.data(ctx.db); | 56 | let data = func.data(ctx.db); |
57 | if !data.has_self_param() { | 57 | if !data.has_self_param() { |
58 | acc.add_function(ctx, func); | 58 | acc.add_function(ctx, func); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | hir::ImplItem::Const(ct) => acc.add_const(ctx, ct), | 61 | hir::AssocItem::Const(ct) => acc.add_const(ctx, ct), |
62 | hir::ImplItem::TypeAlias(ty) => acc.add_type_alias(ctx, ty), | 62 | hir::AssocItem::TypeAlias(ty) => acc.add_type_alias(ctx, ty), |
63 | } | 63 | } |
64 | None::<()> | 64 | None::<()> |
65 | }); | 65 | }); |