From 0a8bbb999ea3098159257d4cdfc416fc827fa444 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Wed, 17 Jun 2026 16:09:04 +0100 Subject: [PATCH] internal: Don't rely on FxHashSet order Previously, SCIP generation would iterate over all the external symbols by calling `.difference()` on an FxHashSet and iterating over them. If any tokens had a moniker but no definition, the loop would terminate early. AFAICS this code is unreachable today (all the monikers also have definitions), but the code is clearly wrong. Ensure we process all tokens regardless of the order. --- crates/rust-analyzer/src/cli/scip.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/cli/scip.rs b/crates/rust-analyzer/src/cli/scip.rs index bca38ed82fdd..d3acbb934d5b 100644 --- a/crates/rust-analyzer/src/cli/scip.rs +++ b/crates/rust-analyzer/src/cli/scip.rs @@ -237,7 +237,7 @@ impl flags::Scip { let token = si.tokens.get(id).unwrap(); let Some(definition) = token.definition else { - break; + continue; }; let file_id = definition.file_id;