mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Move body queries to hir_def
This commit is contained in:
parent
ef02296b9f
commit
1583ab1558
12 changed files with 110 additions and 75 deletions
|
@ -146,7 +146,7 @@ impl SourceAnalyzer {
|
|||
let def_with_body = def_with_body_from_child_node(db, file_id, node);
|
||||
if let Some(def) = def_with_body {
|
||||
let source_map = def.body_source_map(db);
|
||||
let scopes = db.expr_scopes(def);
|
||||
let scopes = def.expr_scopes(db);
|
||||
let scope = match offset {
|
||||
None => scope_for(&scopes, &source_map, file_id.into(), &node),
|
||||
Some(offset) => scope_for_offset(&scopes, &source_map, file_id.into(), offset),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue