diff options
author | Aleksey Kladov <[email protected]> | 2019-11-22 15:51:53 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-22 15:51:53 +0000 |
commit | fe119fef2746bade402fb73dcba8cde49779654d (patch) | |
tree | 895e5bb04a4a632b4069bf66f8c7770cfa80a90d /crates/ra_hir/src/code_model.rs | |
parent | d4f4ae0dd88f0baf0065d612f41fea3d54af79fd (diff) |
Hide data from public API
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 1b65eefe5..af07b2c4d 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -10,7 +10,7 @@ use hir_def::{ | |||
10 | adt::VariantData, | 10 | adt::VariantData, |
11 | body::scope::ExprScopes, | 11 | body::scope::ExprScopes, |
12 | builtin_type::BuiltinType, | 12 | builtin_type::BuiltinType, |
13 | data::{ConstData, TraitData}, | 13 | data::TraitData, |
14 | nameres::per_ns::PerNs, | 14 | nameres::per_ns::PerNs, |
15 | resolver::{HasResolver, TypeNs}, | 15 | resolver::{HasResolver, TypeNs}, |
16 | type_ref::TypeRef, | 16 | type_ref::TypeRef, |
@@ -644,12 +644,8 @@ impl Const { | |||
644 | Some(self.module(db).krate()) | 644 | Some(self.module(db).krate()) |
645 | } | 645 | } |
646 | 646 | ||
647 | pub fn data(self, db: &impl HirDatabase) -> Arc<ConstData> { | ||
648 | db.const_data(self.id) | ||
649 | } | ||
650 | |||
651 | pub fn name(self, db: &impl HirDatabase) -> Option<Name> { | 647 | pub fn name(self, db: &impl HirDatabase) -> Option<Name> { |
652 | self.data(db).name.clone() | 648 | db.const_data(self.id).name.clone() |
653 | } | 649 | } |
654 | 650 | ||
655 | pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { | 651 | pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { |
@@ -695,10 +691,6 @@ impl Static { | |||
695 | Some(self.module(db).krate()) | 691 | Some(self.module(db).krate()) |
696 | } | 692 | } |
697 | 693 | ||
698 | pub fn data(self, db: &impl HirDatabase) -> Arc<ConstData> { | ||
699 | db.static_data(self.id) | ||
700 | } | ||
701 | |||
702 | pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { | 694 | pub fn infer(self, db: &impl HirDatabase) -> Arc<InferenceResult> { |
703 | db.infer(self.into()) | 695 | db.infer(self.into()) |
704 | } | 696 | } |