aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/hir/module/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/hir/module/mod.rs')
-rw-r--r--crates/ra_analysis/src/hir/module/mod.rs4
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) => {