mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
remove DefKind::Function
This commit is contained in:
parent
ec7ed054e0
commit
1754dd9fdd
2 changed files with 4 additions and 6 deletions
|
@ -77,7 +77,9 @@ impl ImplData {
|
|||
.impl_items()
|
||||
.map(|item_node| {
|
||||
let kind = match item_node.kind() {
|
||||
ast::ImplItemKind::FnDef(..) => DefKind::Function,
|
||||
ast::ImplItemKind::FnDef(it) => {
|
||||
return ImplItem::Method(Function::from_ast(db, module, file_id, it));
|
||||
}
|
||||
ast::ImplItemKind::ConstDef(..) => DefKind::Item,
|
||||
ast::ImplItemKind::TypeDef(..) => DefKind::Item,
|
||||
};
|
||||
|
@ -93,9 +95,7 @@ impl ImplData {
|
|||
};
|
||||
let def_id = def_loc.id(db);
|
||||
match item_node.kind() {
|
||||
ast::ImplItemKind::FnDef(it) => {
|
||||
ImplItem::Method(Function::from_ast(db, module, file_id, it))
|
||||
}
|
||||
ast::ImplItemKind::FnDef(_) => unreachable!(),
|
||||
ast::ImplItemKind::ConstDef(..) => ImplItem::Const(def_id),
|
||||
ast::ImplItemKind::TypeDef(..) => ImplItem::Type(def_id),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue