diff options
Diffstat (limited to 'crates/ra_hir/src/impl_block.rs')
-rw-r--r-- | crates/ra_hir/src/impl_block.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs index 29becd317..274169f93 100644 --- a/crates/ra_hir/src/impl_block.rs +++ b/crates/ra_hir/src/impl_block.rs | |||
@@ -77,7 +77,9 @@ impl ImplData { | |||
77 | .impl_items() | 77 | .impl_items() |
78 | .map(|item_node| { | 78 | .map(|item_node| { |
79 | let kind = match item_node.kind() { | 79 | let kind = match item_node.kind() { |
80 | ast::ImplItemKind::FnDef(..) => DefKind::Function, | 80 | ast::ImplItemKind::FnDef(it) => { |
81 | return ImplItem::Method(Function::from_ast(db, module, file_id, it)); | ||
82 | } | ||
81 | ast::ImplItemKind::ConstDef(..) => DefKind::Item, | 83 | ast::ImplItemKind::ConstDef(..) => DefKind::Item, |
82 | ast::ImplItemKind::TypeDef(..) => DefKind::Item, | 84 | ast::ImplItemKind::TypeDef(..) => DefKind::Item, |
83 | }; | 85 | }; |
@@ -93,9 +95,7 @@ impl ImplData { | |||
93 | }; | 95 | }; |
94 | let def_id = def_loc.id(db); | 96 | let def_id = def_loc.id(db); |
95 | match item_node.kind() { | 97 | match item_node.kind() { |
96 | ast::ImplItemKind::FnDef(it) => { | 98 | ast::ImplItemKind::FnDef(_) => unreachable!(), |
97 | ImplItem::Method(Function::from_ast(db, module, file_id, it)) | ||
98 | } | ||
99 | ast::ImplItemKind::ConstDef(..) => ImplItem::Const(def_id), | 99 | ast::ImplItemKind::ConstDef(..) => ImplItem::Const(def_id), |
100 | ast::ImplItemKind::TypeDef(..) => ImplItem::Type(def_id), | 100 | ast::ImplItemKind::TypeDef(..) => ImplItem::Type(def_id), |
101 | } | 101 | } |