We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f454ea8 commit 2b31835Copy full SHA for 2b31835
crates/rust-analyzer/src/cli/scip.rs
@@ -142,7 +142,9 @@ impl flags::Scip {
142
let mut symbol_roles = Default::default();
143
144
if let Some(def) = token.definition {
145
- if def.range == text_range {
+ // if the the range of the def and the range of the token are the same, this must be the definition.
146
+ // they also must be in the same file. See https://github.com/rust-lang/rust-analyzer/pull/17988
147
+ if def.file_id == file_id && def.range == text_range {
148
symbol_roles |= scip_types::SymbolRole::Definition as i32;
149
}
150
0 commit comments