diff options
author | Aleksey Kladov <[email protected]> | 2019-03-26 16:15:39 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-26 16:15:39 +0000 |
commit | 1325a31e34a3b4bf5104a743bcb8217ef5c4f3cd (patch) | |
tree | 38786cb16a84aadf153dbc9d90b8e87dd7c02eac /crates | |
parent | e28db444dfdc797002bd3561940cde2659b831de (diff) |
reduce visibility
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir/src/code_model_api.rs | 4 | ||||
-rw-r--r-- | crates/ra_hir/src/ids.rs | 20 |
2 files changed, 12 insertions, 12 deletions
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::{ | |||
13 | adt::{EnumVariantId, StructFieldId, VariantDef}, | 13 | adt::{EnumVariantId, StructFieldId, VariantDef}, |
14 | generics::GenericParams, | 14 | generics::GenericParams, |
15 | docs::{Documentation, Docs, docs_from_ast}, | 15 | docs::{Documentation, Docs, docs_from_ast}, |
16 | ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeId}, | 16 | ids::{FunctionId, StructId, EnumId, AstItemDef, ConstId, StaticId, TraitId, TypeAliasId}, |
17 | impl_block::ImplBlock, | 17 | impl_block::ImplBlock, |
18 | resolve::Resolver, | 18 | resolve::Resolver, |
19 | diagnostics::DiagnosticSink, | 19 | diagnostics::DiagnosticSink, |
@@ -672,7 +672,7 @@ impl Docs for Trait { | |||
672 | 672 | ||
673 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 673 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
674 | pub struct TypeAlias { | 674 | pub struct TypeAlias { |
675 | pub(crate) id: TypeId, | 675 | pub(crate) id: TypeAliasId, |
676 | } | 676 | } |
677 | 677 | ||
678 | impl TypeAlias { | 678 | 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 { | |||
21 | consts: LocationInterner<ItemLoc<ast::ConstDef>, ConstId>, | 21 | consts: LocationInterner<ItemLoc<ast::ConstDef>, ConstId>, |
22 | statics: LocationInterner<ItemLoc<ast::StaticDef>, StaticId>, | 22 | statics: LocationInterner<ItemLoc<ast::StaticDef>, StaticId>, |
23 | traits: LocationInterner<ItemLoc<ast::TraitDef>, TraitId>, | 23 | traits: LocationInterner<ItemLoc<ast::TraitDef>, TraitId>, |
24 | types: LocationInterner<ItemLoc<ast::TypeAliasDef>, TypeId>, | 24 | types: LocationInterner<ItemLoc<ast::TypeAliasDef>, TypeAliasId>, |
25 | } | 25 | } |
26 | 26 | ||
27 | impl HirInterner { | 27 | impl HirInterner { |
@@ -229,7 +229,7 @@ pub(crate) trait AstItemDef<N: AstNode>: ArenaId + Clone { | |||
229 | } | 229 | } |
230 | 230 | ||
231 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 231 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
232 | pub struct FunctionId(RawId); | 232 | pub(crate) struct FunctionId(RawId); |
233 | impl_arena_id!(FunctionId); | 233 | impl_arena_id!(FunctionId); |
234 | impl AstItemDef<ast::FnDef> for FunctionId { | 234 | impl AstItemDef<ast::FnDef> for FunctionId { |
235 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::FnDef>, Self> { | 235 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::FnDef>, Self> { |
@@ -238,7 +238,7 @@ impl AstItemDef<ast::FnDef> for FunctionId { | |||
238 | } | 238 | } |
239 | 239 | ||
240 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 240 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
241 | pub struct StructId(RawId); | 241 | pub(crate) struct StructId(RawId); |
242 | impl_arena_id!(StructId); | 242 | impl_arena_id!(StructId); |
243 | impl AstItemDef<ast::StructDef> for StructId { | 243 | impl AstItemDef<ast::StructDef> for StructId { |
244 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::StructDef>, Self> { | 244 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::StructDef>, Self> { |
@@ -247,7 +247,7 @@ impl AstItemDef<ast::StructDef> for StructId { | |||
247 | } | 247 | } |
248 | 248 | ||
249 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 249 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
250 | pub struct EnumId(RawId); | 250 | pub(crate) struct EnumId(RawId); |
251 | impl_arena_id!(EnumId); | 251 | impl_arena_id!(EnumId); |
252 | impl AstItemDef<ast::EnumDef> for EnumId { | 252 | impl AstItemDef<ast::EnumDef> for EnumId { |
253 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::EnumDef>, Self> { | 253 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::EnumDef>, Self> { |
@@ -256,7 +256,7 @@ impl AstItemDef<ast::EnumDef> for EnumId { | |||
256 | } | 256 | } |
257 | 257 | ||
258 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 258 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
259 | pub struct ConstId(RawId); | 259 | pub(crate) struct ConstId(RawId); |
260 | impl_arena_id!(ConstId); | 260 | impl_arena_id!(ConstId); |
261 | impl AstItemDef<ast::ConstDef> for ConstId { | 261 | impl AstItemDef<ast::ConstDef> for ConstId { |
262 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::ConstDef>, Self> { | 262 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::ConstDef>, Self> { |
@@ -265,7 +265,7 @@ impl AstItemDef<ast::ConstDef> for ConstId { | |||
265 | } | 265 | } |
266 | 266 | ||
267 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 267 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
268 | pub struct StaticId(RawId); | 268 | pub(crate) struct StaticId(RawId); |
269 | impl_arena_id!(StaticId); | 269 | impl_arena_id!(StaticId); |
270 | impl AstItemDef<ast::StaticDef> for StaticId { | 270 | impl AstItemDef<ast::StaticDef> for StaticId { |
271 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::StaticDef>, Self> { | 271 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::StaticDef>, Self> { |
@@ -274,7 +274,7 @@ impl AstItemDef<ast::StaticDef> for StaticId { | |||
274 | } | 274 | } |
275 | 275 | ||
276 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 276 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
277 | pub struct TraitId(RawId); | 277 | pub(crate) struct TraitId(RawId); |
278 | impl_arena_id!(TraitId); | 278 | impl_arena_id!(TraitId); |
279 | impl AstItemDef<ast::TraitDef> for TraitId { | 279 | impl AstItemDef<ast::TraitDef> for TraitId { |
280 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::TraitDef>, Self> { | 280 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::TraitDef>, Self> { |
@@ -283,9 +283,9 @@ impl AstItemDef<ast::TraitDef> for TraitId { | |||
283 | } | 283 | } |
284 | 284 | ||
285 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 285 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |
286 | pub struct TypeId(RawId); | 286 | pub(crate) struct TypeAliasId(RawId); |
287 | impl_arena_id!(TypeId); | 287 | impl_arena_id!(TypeAliasId); |
288 | impl AstItemDef<ast::TypeAliasDef> for TypeId { | 288 | impl AstItemDef<ast::TypeAliasDef> for TypeAliasId { |
289 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::TypeAliasDef>, Self> { | 289 | fn interner(interner: &HirInterner) -> &LocationInterner<ItemLoc<ast::TypeAliasDef>, Self> { |
290 | &interner.types | 290 | &interner.types |
291 | } | 291 | } |