Skip to content

Commit 6d42e75

Browse files
committed
Auto merge of rust-lang#14323 - ComputerDruid:fix_overlap_indexes, r=Veykril
Fix overlap deduping infinite loop Fixes: rust-lang#14276
2 parents 9fca0a4 + 2691143 commit 6d42e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/rust-analyzer/src/reload.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ impl ProjectFolders {
527527
// maps include paths to indices of the corresponding root
528528
let mut include_to_idx = FxHashMap::default();
529529
// Find and note down the indices of overlapping roots
530-
for (idx, root) in roots.iter().filter(|it| !it.include.is_empty()).enumerate() {
530+
for (idx, root) in roots.iter().enumerate().filter(|(_, it)| !it.include.is_empty()) {
531531
for include in &root.include {
532532
match include_to_idx.entry(include) {
533533
Entry::Occupied(e) => {

0 commit comments

Comments
 (0)