diff options
author | Aleksey Kladov <[email protected]> | 2018-11-27 23:25:03 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-11-27 23:25:03 +0000 |
commit | ec45dfea1e37ba40ea3e2c8c6df0991a3d49213f (patch) | |
tree | d3538aa9f79e8145a246656a48c96ed63777171a /crates/ra_analysis/src/hir/module | |
parent | 65c064b2a99fb9c0589672ae6c9848aaa9e0efcf (diff) |
rename file_syntax -> source_file
Diffstat (limited to 'crates/ra_analysis/src/hir/module')
-rw-r--r-- | crates/ra_analysis/src/hir/module/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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 { | |||
49 | db: &impl HirDatabase, | 49 | db: &impl HirDatabase, |
50 | position: FilePosition, | 50 | position: FilePosition, |
51 | ) -> Cancelable<Option<Module>> { | 51 | ) -> Cancelable<Option<Module>> { |
52 | let file = db.file_syntax(position.file_id); | 52 | let file = db.source_file(position.file_id); |
53 | let module_source = match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) | 53 | let module_source = match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) |
54 | { | 54 | { |
55 | Some(m) if !m.has_semi() => ModuleSource::new_inline(db, position.file_id, m), | 55 | Some(m) if !m.has_semi() => ModuleSource::new_inline(db, position.file_id, m), |
@@ -346,7 +346,7 @@ impl ModuleSource { | |||
346 | pub(crate) fn resolve(self, db: &impl HirDatabase) -> ModuleSourceNode { | 346 | pub(crate) fn resolve(self, db: &impl HirDatabase) -> ModuleSourceNode { |
347 | match self { | 347 | match self { |
348 | ModuleSource::SourceFile(file_id) => { | 348 | ModuleSource::SourceFile(file_id) => { |
349 | let syntax = db.file_syntax(file_id); | 349 | let syntax = db.source_file(file_id); |
350 | ModuleSourceNode::SourceFile(syntax.ast().owned()) | 350 | ModuleSourceNode::SourceFile(syntax.ast().owned()) |
351 | } | 351 | } |
352 | ModuleSource::Module(item_id) => { | 352 | ModuleSource::Module(item_id) => { |