mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 06:41:48 +00:00
Check Fileid in SourceFileMap
This commit is contained in:
parent
13100da7a2
commit
159525b120
5 changed files with 23 additions and 7 deletions
|
@ -75,7 +75,7 @@ pub fn function_from_source(
|
|||
) -> Cancelable<Option<Function>> {
|
||||
let module = ctry!(module_from_child_node(db, file_id, fn_def.syntax())?);
|
||||
let file_items = db.file_items(file_id);
|
||||
let item_id = file_items.id_of(fn_def.syntax());
|
||||
let item_id = file_items.id_of(file_id, fn_def.syntax());
|
||||
let source_item_id = SourceItemId { file_id, item_id };
|
||||
let def_loc = DefLoc {
|
||||
kind: DefKind::Function,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue