aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/from_source.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/from_source.rs')
-rw-r--r--crates/ra_hir/src/from_source.rs10
1 files changed, 2 insertions, 8 deletions
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs
index 7e5523c54..ec56dfa6a 100644
--- a/crates/ra_hir/src/from_source.rs
+++ b/crates/ra_hir/src/from_source.rs
@@ -82,14 +82,8 @@ impl FromSource for TypeAlias {
82impl FromSource for ImplBlock { 82impl FromSource for ImplBlock {
83 type Ast = ast::ImplBlock; 83 type Ast = ast::ImplBlock;
84 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> { 84 fn from_source(db: &(impl DefDatabase + AstDatabase), src: Source<Self::Ast>) -> Option<Self> {
85 let module_src = crate::ModuleSource::from_child_node( 85 let id = from_source(db, src)?;
86 db, 86 Some(ImplBlock { id })
87 src.file_id.original_file(db),
88 &src.ast.syntax(),
89 );
90 let module = Module::from_definition(db, Source { file_id: src.file_id, ast: module_src })?;
91 let impls = module.impl_blocks(db);
92 impls.into_iter().find(|b| b.source(db) == src)
93 } 87 }
94} 88}
95 89