about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-03-11 06:54:36 +0000
committerbors <bors@rust-lang.org>2023-03-11 06:54:36 +0000
commit6d42e75ce848659719fd05548eee4eee6e2efa89 (patch)
tree041bd87fd90d85f6b8ad3684330813ec953cf671
parent9fca0a4afefead3daf8f66fd357999d7cd520880 (diff)
parent2691143a6711f546d59cf6e8e86637e30e0d9033 (diff)
downloadrust-6d42e75ce848659719fd05548eee4eee6e2efa89.tar.gz
rust-6d42e75ce848659719fd05548eee4eee6e2efa89.zip
Auto merge of #14323 - ComputerDruid:fix_overlap_indexes, r=Veykril
Fix overlap deduping infinite loop

Fixes: #14276
-rw-r--r--crates/rust-analyzer/src/reload.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/reload.rs b/crates/rust-analyzer/src/reload.rs
index fca242d91fd..28d37f5685a 100644
--- a/crates/rust-analyzer/src/reload.rs
+++ b/crates/rust-analyzer/src/reload.rs
@@ -527,7 +527,7 @@ impl ProjectFolders {
             // maps include paths to indices of the corresponding root
             let mut include_to_idx = FxHashMap::default();
             // Find and note down the indices of overlapping roots
-            for (idx, root) in roots.iter().filter(|it| !it.include.is_empty()).enumerate() {
+            for (idx, root) in roots.iter().enumerate().filter(|(_, it)| !it.include.is_empty()) {
                 for include in &root.include {
                     match include_to_idx.entry(include) {
                         Entry::Occupied(e) => {