Check Fileid in SourceFileMap

This commit is contained in:
Aleksey Kladov 2018-12-09 13:18:46 +03:00
parent 13100da7a2
commit 159525b120
5 changed files with 23 additions and 7 deletions

View file

@ -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,