remove ast::*Kind from hir

This commit is contained in:
Aleksey Kladov 2019-08-19 14:04:51 +03:00
parent 39e444d701
commit b50a04827c
6 changed files with 86 additions and 83 deletions

View file

@ -131,10 +131,10 @@ impl ImplData {
let items = if let Some(item_list) = node.item_list() {
item_list
.impl_items()
.map(|item_node| match item_node.kind() {
ast::ImplItemKind::FnDef(it) => Function { id: ctx.to_def(&it) }.into(),
ast::ImplItemKind::ConstDef(it) => Const { id: ctx.to_def(&it) }.into(),
ast::ImplItemKind::TypeAliasDef(it) => TypeAlias { id: ctx.to_def(&it) }.into(),
.map(|item_node| match item_node {
ast::ImplItem::FnDef(it) => Function { id: ctx.to_def(&it) }.into(),
ast::ImplItem::ConstDef(it) => Const { id: ctx.to_def(&it) }.into(),
ast::ImplItem::TypeAliasDef(it) => TypeAlias { id: ctx.to_def(&it) }.into(),
})
.collect()
} else {