aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/presentation.rs
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/presentation.rs
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/presentation.rs')
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs4
1 files changed, 2 insertions, 2 deletions
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,