fix syntax errors in tests
This commit is contained in:
@@ -46,7 +46,7 @@ pub fn module_from_declaration(
|
||||
|
||||
/// Locates the module by position in the source code.
|
||||
pub fn module_from_position(db: &impl HirDatabase, position: FilePosition) -> Option<Module> {
|
||||
let file = db.parse(position.file_id);
|
||||
let file = db.parse(position.file_id).tree;
|
||||
match find_node_at_offset::<ast::Module>(file.syntax(), position.offset) {
|
||||
Some(m) if !m.has_semi() => module_from_inline(db, position.file_id.into(), m),
|
||||
_ => module_from_file_id(db, position.file_id.into()),
|
||||
|
||||
Reference in New Issue
Block a user