aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 179faebfb..860e10069 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -46,7 +46,7 @@ pub fn module_from_declaration(
46 46
47/// Locates the module by position in the source code. 47/// Locates the module by position in the source code.
48pub fn module_from_position(db: &impl HirDatabase, position: FilePosition) -> Option<Module> { 48pub fn module_from_position(db: &impl HirDatabase, position: FilePosition) -> Option<Module> {
49 let file = db.parse(position.file_id); 49 let file = db.parse(position.file_id).tree;
50 match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) { 50 match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) {
51 Some(m) if !m.has_semi() => module_from_inline(db, position.file_id.into(), m), 51 Some(m) if !m.has_semi() => module_from_inline(db, position.file_id.into(), m),
52 _ => module_from_file_id(db, position.file_id.into()), 52 _ => module_from_file_id(db, position.file_id.into()),