This commit is contained in:
Aleksey Kladov 2019-01-02 12:49:09 +03:00
parent db8d293208
commit 4fe0ec5497
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ pub trait HirDatabase: SyntaxDatabase
{
fn hir_source_file(file_id: HirFileId) -> SourceFileNode {
type HirSourceFileQuery;
use fn HirFileId::source_file_query;
use fn HirFileId::hir_source_file;
}
fn expand_macro_invocation(invoc: MacroCallId) -> Option<Arc<MacroExpansion>> {
type ExpandMacroCallQuery;

View File

@ -45,7 +45,7 @@ impl HirFileId {
HirFileIdRepr::Macro(_r) => panic!("macro generated file: {:?}", self),
}
}
pub(crate) fn source_file_query(db: &impl HirDatabase, file_id: HirFileId) -> SourceFileNode {
pub(crate) fn hir_source_file(db: &impl HirDatabase, file_id: HirFileId) -> SourceFileNode {
match file_id.0 {
HirFileIdRepr::File(file_id) => db.source_file(file_id),
HirFileIdRepr::Macro(m) => {