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_hir/src/code_model_api.rs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir/src/code_model_api.rs') diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 29c08e34b..278407504 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs @@ -85,9 +85,19 @@ pub enum ModuleDef { Const(Const), Static(Static), Trait(Trait), - Type(Type), -} -impl_froms!(ModuleDef: Module, Function, Struct, Enum, EnumVariant, Const, Static, Trait, Type); + TypeAlias(TypeAlias), +} +impl_froms!( + ModuleDef: Module, + Function, + Struct, + Enum, + EnumVariant, + Const, + Static, + Trait, + TypeAlias +); pub enum ModuleSource { SourceFile(TreeArc), @@ -604,11 +614,11 @@ impl Docs for Trait { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct Type { +pub struct TypeAlias { pub(crate) id: TypeId, } -impl Type { +impl TypeAlias { pub fn source(&self, db: &impl PersistentHirDatabase) -> (HirFileId, TreeArc) { self.id.source(db) } @@ -645,7 +655,7 @@ impl Type { } } -impl Docs for Type { +impl Docs for TypeAlias { fn docs(&self, db: &impl HirDatabase) -> Option { docs_from_ast(&*self.source(db).1) } -- cgit v1.2.3