aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-24 20:39:27 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-24 20:39:27 +0000
commitdfca3cbeb0680ad1e3694d442b6c761fe3007521 (patch)
treee87434ec26daadf0c3d1f8486391d6c183b29c49 /crates/ra_ide_api/src/completion
parent61d961263387f7293f3d0c4d7b8c8c9a07959ced (diff)
parentbd8ed644e4362785b079ba9fbe2d4e490a678d27 (diff)
Merge #894
894: Rename Type => TypeAlias r=matklad a=flodiebold Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs2
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs4
2 files changed, 3 insertions, 3 deletions
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) {
46 } 46 }
47 } 47 }
48 hir::ImplItem::Const(ct) => acc.add_const(ctx, ct), 48 hir::ImplItem::Const(ct) => acc.add_const(ctx, ct),
49 hir::ImplItem::Type(ty) => acc.add_type(ctx, ty), 49 hir::ImplItem::TypeAlias(ty) => acc.add_type_alias(ctx, ty),
50 } 50 }
51 None::<()> 51 None::<()>
52 }); 52 });
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 {
65 Resolution::Def(Const(it)) => (CompletionItemKind::Const, it.docs(ctx.db)), 65 Resolution::Def(Const(it)) => (CompletionItemKind::Const, it.docs(ctx.db)),
66 Resolution::Def(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)), 66 Resolution::Def(Static(it)) => (CompletionItemKind::Static, it.docs(ctx.db)),
67 Resolution::Def(Trait(it)) => (CompletionItemKind::Trait, it.docs(ctx.db)), 67 Resolution::Def(Trait(it)) => (CompletionItemKind::Trait, it.docs(ctx.db)),
68 Resolution::Def(Type(it)) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)), 68 Resolution::Def(TypeAlias(it)) => (CompletionItemKind::TypeAlias, it.docs(ctx.db)),
69 Resolution::GenericParam(..) => (CompletionItemKind::TypeParam, None), 69 Resolution::GenericParam(..) => (CompletionItemKind::TypeParam, None),
70 Resolution::LocalBinding(..) => (CompletionItemKind::Binding, None), 70 Resolution::LocalBinding(..) => (CompletionItemKind::Binding, None),
71 Resolution::SelfType(..) => ( 71 Resolution::SelfType(..) => (
@@ -132,7 +132,7 @@ impl Completions {
132 .add_to(self); 132 .add_to(self);
133 } 133 }
134 134
135 pub(crate) fn add_type(&mut self, ctx: &CompletionContext, type_alias: hir::Type) { 135 pub(crate) fn add_type_alias(&mut self, ctx: &CompletionContext, type_alias: hir::TypeAlias) {
136 let (_file_id, type_def) = type_alias.source(ctx.db); 136 let (_file_id, type_def) = type_alias.source(ctx.db);
137 let name = match type_def.name() { 137 let name = match type_def.name() {
138 Some(name) => name, 138 Some(name) => name,