diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-24 20:39:27 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-24 20:39:27 +0000 |
commit | dfca3cbeb0680ad1e3694d442b6c761fe3007521 (patch) | |
tree | e87434ec26daadf0c3d1f8486391d6c183b29c49 /crates/ra_ide_api | |
parent | 61d961263387f7293f3d0c4d7b8c8c9a07959ced (diff) | |
parent | bd8ed644e4362785b079ba9fbe2d4e490a678d27 (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')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_path.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/presentation.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/navigation_target.rs | 2 |
3 files changed, 4 insertions, 4 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, |
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 { | |||
154 | let (file_id, node) = e.source(db); | 154 | let (file_id, node) = e.source(db); |
155 | NavigationTarget::from_named(file_id.original_file(db), &*node) | 155 | NavigationTarget::from_named(file_id.original_file(db), &*node) |
156 | } | 156 | } |
157 | hir::ModuleDef::Type(e) => { | 157 | hir::ModuleDef::TypeAlias(e) => { |
158 | let (file_id, node) = e.source(db); | 158 | let (file_id, node) = e.source(db); |
159 | NavigationTarget::from_named(file_id.original_file(db), &*node) | 159 | NavigationTarget::from_named(file_id.original_file(db), &*node) |
160 | } | 160 | } |