mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Rename Type => TypeAlias
This commit is contained in:
parent
61d9612633
commit
bd8ed644e4
12 changed files with 57 additions and 43 deletions
|
@ -7,7 +7,7 @@ use ra_syntax::{
|
|||
ast::{self, AstNode}};
|
||||
|
||||
use crate::{
|
||||
Const, Type, Function, HirFileId,
|
||||
Const, TypeAlias, Function, HirFileId,
|
||||
HirDatabase, PersistentHirDatabase,
|
||||
ModuleDef, Trait, Resolution,
|
||||
type_ref::TypeRef,
|
||||
|
@ -135,13 +135,9 @@ impl ImplData {
|
|||
item_list
|
||||
.impl_items()
|
||||
.map(|item_node| match item_node.kind() {
|
||||
ast::ImplItemKind::FnDef(it) => {
|
||||
ImplItem::Method(Function { id: ctx.to_def(it) })
|
||||
}
|
||||
ast::ImplItemKind::ConstDef(it) => {
|
||||
ImplItem::Const(Const { id: ctx.to_def(it) })
|
||||
}
|
||||
ast::ImplItemKind::TypeDef(it) => ImplItem::Type(Type { id: ctx.to_def(it) }),
|
||||
ast::ImplItemKind::FnDef(it) => Function { id: ctx.to_def(it) }.into(),
|
||||
ast::ImplItemKind::ConstDef(it) => Const { id: ctx.to_def(it) }.into(),
|
||||
ast::ImplItemKind::TypeDef(it) => TypeAlias { id: ctx.to_def(it) }.into(),
|
||||
})
|
||||
.collect()
|
||||
} else {
|
||||
|
@ -168,10 +164,10 @@ impl ImplData {
|
|||
pub enum ImplItem {
|
||||
Method(Function),
|
||||
Const(Const),
|
||||
Type(Type),
|
||||
TypeAlias(TypeAlias),
|
||||
// Existential
|
||||
}
|
||||
impl_froms!(ImplItem: Const, Type);
|
||||
impl_froms!(ImplItem: Const, TypeAlias);
|
||||
|
||||
impl From<Function> for ImplItem {
|
||||
fn from(func: Function) -> ImplItem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue