mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
rename source_file -> parse
This commit is contained in:
parent
ac757e114e
commit
9457b1f0e6
19 changed files with 41 additions and 47 deletions
|
@ -10,7 +10,7 @@ use crate::{FilePosition, CallInfo, db::RootDatabase};
|
|||
|
||||
/// Computes parameter information for the given call expression.
|
||||
pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<CallInfo> {
|
||||
let file = db.source_file(position.file_id);
|
||||
let file = db.parse(position.file_id);
|
||||
let syntax = file.syntax();
|
||||
|
||||
// Find the calling expression and it's NameRef
|
||||
|
@ -22,7 +22,7 @@ pub(crate) fn call_info(db: &RootDatabase, position: FilePosition) -> Option<Cal
|
|||
let symbol = file_symbols
|
||||
.into_iter()
|
||||
.find(|it| it.ptr.kind() == FN_DEF)?;
|
||||
let fn_file = db.source_file(symbol.file_id);
|
||||
let fn_file = db.parse(symbol.file_id);
|
||||
let fn_def = symbol.ptr.to_node(&fn_file);
|
||||
let fn_def = ast::FnDef::cast(fn_def).unwrap();
|
||||
let mut call_info = CallInfo::new(fn_def)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue