Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-db/src/search.rs')
-rw-r--r--crates/ide-db/src/search.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide-db/src/search.rs b/crates/ide-db/src/search.rs
index a48438cfa8..1d865892a2 100644
--- a/crates/ide-db/src/search.rs
+++ b/crates/ide-db/src/search.rs
@@ -1345,7 +1345,7 @@ impl ReferenceCategory {
// If the variable or field ends on the LHS's end then it's a Write
// (covers fields and locals). FIXME: This is not terribly accurate.
if let Some(lhs) = expr.lhs()
- && lhs.syntax().text_range().end() == r.syntax().text_range().end() {
+ && lhs.syntax().text_range().contains_range(r.syntax().text_range()) {
return Some(ReferenceCategory::WRITE)
}
}