mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
small rename
This commit is contained in:
parent
35b3fc02e0
commit
1076e82856
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user