aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/source_binder.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index bb638bcb6..880596615 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -96,15 +96,9 @@ fn function_from_source(
96 fn_def: &ast::FnDef, 96 fn_def: &ast::FnDef,
97) -> Option<Function> { 97) -> Option<Function> {
98 let module = module_from_child_node(db, file_id, fn_def.syntax())?; 98 let module = module_from_child_node(db, file_id, fn_def.syntax())?;
99 let res = function_from_module(db, module, fn_def);
100 Some(res)
101}
102
103fn function_from_module(db: &impl HirDatabase, module: Module, fn_def: &ast::FnDef) -> Function {
104 let (file_id, _) = module.definition_source(db);
105 let file_id = file_id.into(); 99 let file_id = file_id.into();
106 let ctx = LocationCtx::new(db, module, file_id); 100 let ctx = LocationCtx::new(db, module, file_id);
107 Function { id: ctx.to_def(fn_def) } 101 Some(Function { id: ctx.to_def(fn_def) })
108} 102}
109 103
110fn function_from_child_node( 104fn function_from_child_node(