mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
parent
ea0c124219
commit
fb5891c433
6 changed files with 26 additions and 18 deletions
|
@ -261,7 +261,7 @@ fn scope_for_offset(
|
|||
.scope_by_expr()
|
||||
.iter()
|
||||
.filter_map(|(id, scope)| {
|
||||
let source = source_map.expr_syntax(*id)?;
|
||||
let source = source_map.expr_syntax(*id).ok()?;
|
||||
// FIXME: correctly handle macro expansion
|
||||
if source.file_id != offset.file_id {
|
||||
return None;
|
||||
|
@ -337,7 +337,7 @@ fn adjust(
|
|||
.scope_by_expr()
|
||||
.iter()
|
||||
.filter_map(|(id, scope)| {
|
||||
let source = source_map.expr_syntax(*id)?;
|
||||
let source = source_map.expr_syntax(*id).ok()?;
|
||||
// FIXME: correctly handle macro expansion
|
||||
if source.file_id != file_id {
|
||||
return None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue