diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-30 19:19:31 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-30 19:19:31 +0000 |
commit | b704ce803b99f0c69bbcd3d4ab531d2604de8594 (patch) | |
tree | 4b347869363f7d7fef0f16ab5f56c7be9c94952a /crates/ra_hir/src/ty/method_resolution.rs | |
parent | 897e74f089ee4c13aeca6f0244c7809c1b631a34 (diff) | |
parent | 04eb15856bd183db3a1785b7cb74e0c32fd78a39 (diff) |
Merge #702
702: Go to Implementation r=matklad a=kjeremy
First half of #620
Co-authored-by: Jeremy Kolb <[email protected]>
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/method_resolution.rs')
-rw-r--r-- | crates/ra_hir/src/ty/method_resolution.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/ty/method_resolution.rs b/crates/ra_hir/src/ty/method_resolution.rs index 9a571c2aa..d70a24582 100644 --- a/crates/ra_hir/src/ty/method_resolution.rs +++ b/crates/ra_hir/src/ty/method_resolution.rs | |||
@@ -44,7 +44,7 @@ impl CrateImplBlocks { | |||
44 | &'a self, | 44 | &'a self, |
45 | db: &'a impl HirDatabase, | 45 | db: &'a impl HirDatabase, |
46 | ty: &Ty, | 46 | ty: &Ty, |
47 | ) -> impl Iterator<Item = ImplBlock> + 'a { | 47 | ) -> impl Iterator<Item = (Module, ImplBlock)> + 'a { |
48 | let fingerprint = TyFingerprint::for_impl(ty); | 48 | let fingerprint = TyFingerprint::for_impl(ty); |
49 | fingerprint | 49 | fingerprint |
50 | .and_then(|f| self.impls.get(&f)) | 50 | .and_then(|f| self.impls.get(&f)) |
@@ -56,7 +56,7 @@ impl CrateImplBlocks { | |||
56 | module_id: *module_id, | 56 | module_id: *module_id, |
57 | }; | 57 | }; |
58 | let module_impl_blocks = db.impls_in_module(module); | 58 | let module_impl_blocks = db.impls_in_module(module); |
59 | ImplBlock::from_id(module_impl_blocks, *impl_id) | 59 | (module, ImplBlock::from_id(module_impl_blocks, *impl_id)) |
60 | }) | 60 | }) |
61 | } | 61 | } |
62 | 62 | ||
@@ -152,7 +152,7 @@ impl Ty { | |||
152 | }; | 152 | }; |
153 | let impls = db.impls_in_crate(krate); | 153 | let impls = db.impls_in_crate(krate); |
154 | 154 | ||
155 | for impl_block in impls.lookup_impl_blocks(db, &derefed_ty) { | 155 | for (_, impl_block) in impls.lookup_impl_blocks(db, &derefed_ty) { |
156 | for item in impl_block.items() { | 156 | for item in impl_block.items() { |
157 | match item { | 157 | match item { |
158 | ImplItem::Method(f) => { | 158 | ImplItem::Method(f) => { |