Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/source_analyzer.rs')
-rw-r--r--crates/hir/src/source_analyzer.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/hir/src/source_analyzer.rs b/crates/hir/src/source_analyzer.rs
index 984a464ed1..e89f8a5429 100644
--- a/crates/hir/src/source_analyzer.rs
+++ b/crates/hir/src/source_analyzer.rs
@@ -650,9 +650,7 @@ fn scope_for_offset(
.filter_map(|(id, scope)| {
let InFile { file_id, value } = source_map.expr_syntax(*id).ok()?;
if from_file == file_id {
- let root = db.parse_or_expand(file_id)?;
- let node = value.to_node(&root);
- return Some((node.syntax().text_range(), scope));
+ return Some((value.text_range(), scope));
}
// FIXME handle attribute expansion