aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/from_source.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs
index e6eefcace..f506bba70 100644
--- a/crates/ra_hir/src/from_source.rs
+++ b/crates/ra_hir/src/from_source.rs
@@ -282,7 +282,9 @@ where
282 let module_src = ModuleSource::from_child_node(db, src.as_ref().map(|it| it.syntax())); 282 let module_src = ModuleSource::from_child_node(db, src.as_ref().map(|it| it.syntax()));
283 let module = Module::from_definition(db, Source::new(src.file_id, module_src))?; 283 let module = Module::from_definition(db, Source::new(src.file_id, module_src))?;
284 let ctx = LocationCtx::new(db, module.id, src.file_id); 284 let ctx = LocationCtx::new(db, module.id, src.file_id);
285 Some(DEF::from_ast(ctx, &src.value)) 285 let items = db.ast_id_map(src.file_id);
286 let item_id = items.ast_id(&src.value);
287 Some(DEF::from_ast_id(ctx, item_id))
286} 288}
287 289
288enum Container { 290enum Container {