aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_analyzer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/source_analyzer.rs')
-rw-r--r--crates/ra_hir/src/source_analyzer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs
index f3f1ed05a..331ecdd9c 100644
--- a/crates/ra_hir/src/source_analyzer.rs
+++ b/crates/ra_hir/src/source_analyzer.rs
@@ -261,7 +261,7 @@ fn scope_for_offset(
261 .scope_by_expr() 261 .scope_by_expr()
262 .iter() 262 .iter()
263 .filter_map(|(id, scope)| { 263 .filter_map(|(id, scope)| {
264 let source = source_map.expr_syntax(*id)?; 264 let source = source_map.expr_syntax(*id).ok()?;
265 // FIXME: correctly handle macro expansion 265 // FIXME: correctly handle macro expansion
266 if source.file_id != offset.file_id { 266 if source.file_id != offset.file_id {
267 return None; 267 return None;
@@ -337,7 +337,7 @@ fn adjust(
337 .scope_by_expr() 337 .scope_by_expr()
338 .iter() 338 .iter()
339 .filter_map(|(id, scope)| { 339 .filter_map(|(id, scope)| {
340 let source = source_map.expr_syntax(*id)?; 340 let source = source_map.expr_syntax(*id).ok()?;
341 // FIXME: correctly handle macro expansion 341 // FIXME: correctly handle macro expansion
342 if source.file_id != file_id { 342 if source.file_id != file_id {
343 return None; 343 return None;