From aa8442af70c00b8e5ccef070447c6bca5d1a055a Mon Sep 17 00:00:00 2001 From: Jonas Schievink Date: Fri, 19 Jun 2020 22:33:13 +0200 Subject: Don't include downstream crate in query --- crates/ra_hir_ty/src/method_resolution.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir_ty/src/method_resolution.rs') diff --git a/crates/ra_hir_ty/src/method_resolution.rs b/crates/ra_hir_ty/src/method_resolution.rs index 01b3362d7..be685e12f 100644 --- a/crates/ra_hir_ty/src/method_resolution.rs +++ b/crates/ra_hir_ty/src/method_resolution.rs @@ -74,7 +74,8 @@ impl CrateImplDefs { impls_by_trait: FxHashMap::default(), }; let mut seen = FxHashSet::default(); - let mut worklist = vec![krate]; + let mut worklist = + crate_graph[krate].dependencies.iter().map(|dep| dep.crate_id).collect::>(); while let Some(krate) = worklist.pop() { if !seen.insert(krate) { continue; -- cgit v1.2.3