aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir_ty/src/method_resolution.rs3
1 files changed, 2 insertions, 1 deletions
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 {
74 impls_by_trait: FxHashMap::default(), 74 impls_by_trait: FxHashMap::default(),
75 }; 75 };
76 let mut seen = FxHashSet::default(); 76 let mut seen = FxHashSet::default();
77 let mut worklist = vec![krate]; 77 let mut worklist =
78 crate_graph[krate].dependencies.iter().map(|dep| dep.crate_id).collect::<Vec<_>>();
78 while let Some(krate) = worklist.pop() { 79 while let Some(krate) = worklist.pop() {
79 if !seen.insert(krate) { 80 if !seen.insert(krate) {
80 continue; 81 continue;