From ec45dfea1e37ba40ea3e2c8c6df0991a3d49213f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 28 Nov 2018 02:25:03 +0300 Subject: rename file_syntax -> source_file --- crates/ra_analysis/src/hir/module/mod.rs | 4 ++-- crates/ra_analysis/src/hir/query_definitions.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_analysis/src/hir') diff --git a/crates/ra_analysis/src/hir/module/mod.rs b/crates/ra_analysis/src/hir/module/mod.rs index a6b7a5466..83f176b32 100644 --- a/crates/ra_analysis/src/hir/module/mod.rs +++ b/crates/ra_analysis/src/hir/module/mod.rs @@ -49,7 +49,7 @@ impl Module { db: &impl HirDatabase, position: FilePosition, ) -> Cancelable> { - let file = db.file_syntax(position.file_id); + let file = db.source_file(position.file_id); let module_source = match find_node_at_offset::(file.syntax(), position.offset) { Some(m) if !m.has_semi() => ModuleSource::new_inline(db, position.file_id, m), @@ -346,7 +346,7 @@ impl ModuleSource { pub(crate) fn resolve(self, db: &impl HirDatabase) -> ModuleSourceNode { match self { ModuleSource::SourceFile(file_id) => { - let syntax = db.file_syntax(file_id); + let syntax = db.source_file(file_id); ModuleSourceNode::SourceFile(syntax.ast().owned()) } ModuleSource::Module(item_id) => { diff --git a/crates/ra_analysis/src/hir/query_definitions.rs b/crates/ra_analysis/src/hir/query_definitions.rs index 6c633e9ab..e7fba5d72 100644 --- a/crates/ra_analysis/src/hir/query_definitions.rs +++ b/crates/ra_analysis/src/hir/query_definitions.rs @@ -38,7 +38,7 @@ pub(super) fn fn_scopes(db: &impl HirDatabase, fn_id: FnId) -> Arc { } pub(super) fn file_items(db: &impl HirDatabase, file_id: FileId) -> Arc { - let source_file = db.file_syntax(file_id); + let source_file = db.source_file(file_id); let source_file = source_file.borrowed(); let mut res = SourceFileItems::default(); source_file -- cgit v1.2.3