From 1325a31e34a3b4bf5104a743bcb8217ef5c4f3cd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 26 Mar 2019 19:15:39 +0300 Subject: reduce visibility --- crates/ra_hir/src/code_model_api.rs | 4 ++-- crates/ra_hir/src/ids.rs | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/code_model_api.rs b/crates/ra_hir/src/code_model_api.rs index 88c13566c..624c25c4d 100644 --- a/crates/ra_hir/src/code_model_api.rs +++ b/crates/ra_hir/src/code_model_api.rs @@ -13,7 +13,7 @@ use crate::{ adt::{EnumVariantId, StructFieldId, VariantDef}, generics::GenericParams, docs::{Documentation, Docs, docs_from_ast}, - ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeId}, + ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeAliasId}, impl_block::ImplBlock, resolve::Resolver, diagnostics::DiagnosticSink, @@ -672,7 +672,7 @@ impl Docs for Trait { #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub struct TypeAlias { - pub(crate) id: TypeId, + pub(crate) id: TypeAliasId, } impl TypeAlias { diff --git a/crates/ra_hir/src/ids.rs b/crates/ra_hir/src/ids.rs index d8a25e246..eb9939df7 100644 --- a/crates/ra_hir/src/ids.rs +++ b/crates/ra_hir/src/ids.rs @@ -21,7 +21,7 @@ pub struct HirInterner { consts: LocationInterner, ConstId>, statics: LocationInterner, StaticId>, traits: LocationInterner, TraitId>, - types: LocationInterner, TypeId>, + types: LocationInterner, TypeAliasId>, } impl HirInterner { @@ -229,7 +229,7 @@ pub(crate) trait AstItemDef: ArenaId + Clone { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct FunctionId(RawId); +pub(crate) struct FunctionId(RawId); impl_arena_id!(FunctionId); impl AstItemDef for FunctionId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { @@ -238,7 +238,7 @@ impl AstItemDef for FunctionId { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct StructId(RawId); +pub(crate) struct StructId(RawId); impl_arena_id!(StructId); impl AstItemDef for StructId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { @@ -247,7 +247,7 @@ impl AstItemDef for StructId { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct EnumId(RawId); +pub(crate) struct EnumId(RawId); impl_arena_id!(EnumId); impl AstItemDef for EnumId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { @@ -256,7 +256,7 @@ impl AstItemDef for EnumId { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct ConstId(RawId); +pub(crate) struct ConstId(RawId); impl_arena_id!(ConstId); impl AstItemDef for ConstId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { @@ -265,7 +265,7 @@ impl AstItemDef for ConstId { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct StaticId(RawId); +pub(crate) struct StaticId(RawId); impl_arena_id!(StaticId); impl AstItemDef for StaticId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { @@ -274,7 +274,7 @@ impl AstItemDef for StaticId { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct TraitId(RawId); +pub(crate) struct TraitId(RawId); impl_arena_id!(TraitId); impl AstItemDef for TraitId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { @@ -283,9 +283,9 @@ impl AstItemDef for TraitId { } #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct TypeId(RawId); -impl_arena_id!(TypeId); -impl AstItemDef for TypeId { +pub(crate) struct TypeAliasId(RawId); +impl_arena_id!(TypeAliasId); +impl AstItemDef for TypeAliasId { fn interner(interner: &HirInterner) -> &LocationInterner, Self> { &interner.types } -- cgit v1.2.3