aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-24 12:20:59 +0000
committerAleksey Kladov <[email protected]>2019-11-24 12:20:59 +0000
commit151180057b0304ee4dee75401e8f1aaa7aaaec21 (patch)
treef61f810aa5f0c9cda0f07bd15d8f03b2d3b5ee83 /crates/ra_hir
parente0b06cb672b7aae770fea24e4a5efdbec8cbf5c6 (diff)
Simplify
Diffstat (limited to 'crates/ra_hir')
-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 {