We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 248a557 commit c2c1bd0Copy full SHA for c2c1bd0
src/tools/rust-analyzer/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