Skip to content

Commit 0a8bbb9

Browse files
committed
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.
1 parent 06070f3 commit 0a8bbb9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/rust-analyzer/src/cli

crates/rust-analyzer/src/cli/scip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ impl flags::Scip {
237237
let token = si.tokens.get(id).unwrap();
238238

239239
let Some(definition) = token.definition else {
240-
break;
240+
continue;
241241
};
242242

243243
let file_id = definition.file_id;

0 commit comments

Comments
 (0)