From bd8ed644e4362785b079ba9fbe2d4e490a678d27 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 24 Feb 2019 21:36:49 +0100 Subject: Rename Type => TypeAlias --- crates/ra_ide_api/src/completion/complete_path.rs | 2 +- crates/ra_ide_api/src/completion/presentation.rs | 4 ++-- crates/ra_ide_api/src/navigation_target.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide_api/src') diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs index 629a7ee77..5ff1b9927 100644 --- a/crates/ra_ide_api/src/completion/complete_path.rs +++ b/crates/ra_ide_api/src/completion/complete_path.rs @@ -46,7 +46,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) { } } hir::ImplItem::Const(ct) => acc.add_const(ctx, ct), - hir::ImplItem::Type(ty) => acc.add_type(ctx, ty), + hir::ImplItem::TypeAlias(ty) => acc.add_type_alias(ctx, ty), } None::<()> }); diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs index 6454436c9..71003104b 100644 --- a/crates/ra_ide_api/src/completion/presentation.rs +++ b/crates/ra_ide_api/src/completion/presentation.rs @@ -65,7 +65,7 @@ impl Completions { Resolution::Def(Const(it)) => (CompletionItemKind::Const, it.docs(ctx.db)), Resolution::Def(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)), Resolution::Def(Trait(it)) => (CompletionItemKind::Trait, it.docs(ctx.db)), - Resolution::Def(Type(it)) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), + Resolution::Def(TypeAlias(it)) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), Resolution::GenericParam(..) => (CompletionItemKind::TypeParam, None), Resolution::LocalBinding(..) => (CompletionItemKind::Binding, None), Resolution::SelfType(..) => ( @@ -132,7 +132,7 @@ impl Completions { .add_to(self); } - pub(crate) fn add_type(&mut self, ctx: &CompletionContext, type_alias: hir::Type) { + pub(crate) fn add_type_alias(&mut self, ctx: &CompletionContext, type_alias: hir::TypeAlias) { let (_file_id, type_def) = type_alias.source(ctx.db); let name = match type_def.name() { Some(name) => name, diff --git a/crates/ra_ide_api/src/navigation_target.rs b/crates/ra_ide_api/src/navigation_target.rs index ce5ae0363..6538081ac 100644 --- a/crates/ra_ide_api/src/navigation_target.rs +++ b/crates/ra_ide_api/src/navigation_target.rs @@ -154,7 +154,7 @@ impl NavigationTarget { let (file_id, node) = e.source(db); NavigationTarget::from_named(file_id.original_file(db), &*node) } - hir::ModuleDef::Type(e) => { + hir::ModuleDef::TypeAlias(e) => { let (file_id, node) = e.source(db); NavigationTarget::from_named(file_id.original_file(db), &*node) } -- cgit v1.2.3