small rename

This commit is contained in:
Aleksey Kladov 2019-01-02 16:00:35 +03:00
parent 35b3fc02e0
commit 1076e82856
2 changed files with 3 additions and 3 deletions

View File

@ -31,12 +31,12 @@ pub struct HirFileId(HirFileIdRepr);
impl HirFileId {
/// For macro-expansion files, returns the file original source file the
/// expansionoriginated from.
pub(crate) fn original_file_id(self, db: &impl HirDatabase) -> FileId {
pub(crate) fn original_file(self, db: &impl HirDatabase) -> FileId {
match self.0 {
HirFileIdRepr::File(file_id) => file_id,
HirFileIdRepr::Macro(macro_call_id) => {
let loc = macro_call_id.loc(db);
loc.source_item_id.file_id.original_file_id(db)
loc.source_item_id.file_id.original_file(db)
}
}
}

View File

@ -155,7 +155,7 @@ fn resolve_submodule(
name: &Name,
) -> (Vec<FileId>, Option<Problem>) {
// FIXME: handle submodules of inline modules properly
let file_id = source.file_id().original_file_id(db);
let file_id = source.file_id().original_file(db);
let source_root_id = db.file_source_root(file_id);
let path = db.file_relative_path(file_id);
let root = RelativePathBuf::default();