aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-22 14:33:53 +0000
committerAleksey Kladov <[email protected]>2019-11-22 14:42:56 +0000
commit64df759418a83fd05fab850b8351fcddbdd3ef63 (patch)
tree2b1d06598328b9d1922e83c791f181b5789eb789 /crates/ra_hir
parentb315f05cf160a11b9012fcde2a9aefc240e39135 (diff)
Make ImplData's fields public
Diffstat (limited to 'crates/ra_hir')
-rw-r--r--crates/ra_hir/src/code_model.rs2
-rw-r--r--crates/ra_hir/src/impl_block.rs8
-rw-r--r--crates/ra_hir/src/ty/infer.rs2
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index f426f8c9f..3daf7488e 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -10,9 +10,9 @@ 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::TraitData,
13 nameres::per_ns::PerNs, 14 nameres::per_ns::PerNs,
14 resolver::{HasResolver, TypeNs}, 15 resolver::{HasResolver, TypeNs},
15 traits::TraitData,
16 type_ref::TypeRef, 16 type_ref::TypeRef,
17 ContainerId, CrateModuleId, HasModule, ImplId, LocalEnumVariantId, LocalStructFieldId, Lookup, 17 ContainerId, CrateModuleId, HasModule, ImplId, LocalEnumVariantId, LocalStructFieldId, Lookup,
18 ModuleId, UnionId, 18 ModuleId, UnionId,
diff --git a/crates/ra_hir/src/impl_block.rs b/crates/ra_hir/src/impl_block.rs
index 774fa1d96..334eeebac 100644
--- a/crates/ra_hir/src/impl_block.rs
+++ b/crates/ra_hir/src/impl_block.rs
@@ -18,11 +18,11 @@ impl HasSource for ImplBlock {
18 18
19impl ImplBlock { 19impl ImplBlock {
20 pub fn target_trait(&self, db: &impl DefDatabase) -> Option<TypeRef> { 20 pub fn target_trait(&self, db: &impl DefDatabase) -> Option<TypeRef> {
21 db.impl_data(self.id).target_trait().cloned() 21 db.impl_data(self.id).target_trait.clone()
22 } 22 }
23 23
24 pub fn target_type(&self, db: &impl DefDatabase) -> TypeRef { 24 pub fn target_type(&self, db: &impl DefDatabase) -> TypeRef {
25 db.impl_data(self.id).target_type().clone() 25 db.impl_data(self.id).target_type.clone()
26 } 26 }
27 27
28 pub fn target_ty(&self, db: &impl HirDatabase) -> Ty { 28 pub fn target_ty(&self, db: &impl HirDatabase) -> Ty {
@@ -35,11 +35,11 @@ impl ImplBlock {
35 } 35 }
36 36
37 pub fn items(&self, db: &impl DefDatabase) -> Vec<AssocItem> { 37 pub fn items(&self, db: &impl DefDatabase) -> Vec<AssocItem> {
38 db.impl_data(self.id).items().iter().map(|it| (*it).into()).collect() 38 db.impl_data(self.id).items.iter().map(|it| (*it).into()).collect()
39 } 39 }
40 40
41 pub fn is_negative(&self, db: &impl DefDatabase) -> bool { 41 pub fn is_negative(&self, db: &impl DefDatabase) -> bool {
42 db.impl_data(self.id).is_negative() 42 db.impl_data(self.id).is_negative
43 } 43 }
44 44
45 pub fn module(&self, db: &impl DefDatabase) -> Module { 45 pub fn module(&self, db: &impl DefDatabase) -> Module {
diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs
index 41a51283d..6e07ab86e 100644
--- a/crates/ra_hir/src/ty/infer.rs
+++ b/crates/ra_hir/src/ty/infer.rs
@@ -22,7 +22,7 @@ use ena::unify::{InPlaceUnificationTable, NoError, UnifyKey, UnifyValue};
22use rustc_hash::FxHashMap; 22use rustc_hash::FxHashMap;
23 23
24use hir_def::{ 24use hir_def::{
25 function::FunctionData, 25 data::FunctionData,
26 path::known, 26 path::known,
27 resolver::{HasResolver, Resolver, TypeNs}, 27 resolver::{HasResolver, Resolver, TypeNs},
28 type_ref::{Mutability, TypeRef}, 28 type_ref::{Mutability, TypeRef},