From 64df759418a83fd05fab850b8351fcddbdd3ef63 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 22 Nov 2019 17:33:53 +0300 Subject: Make ImplData's fields public --- crates/ra_hir/src/code_model.rs | 2 +- crates/ra_hir/src/impl_block.rs | 8 ++++---- crates/ra_hir/src/ty/infer.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_hir') 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::{ adt::VariantData, body::scope::ExprScopes, builtin_type::BuiltinType, + data::TraitData, nameres::per_ns::PerNs, resolver::{HasResolver, TypeNs}, - traits::TraitData, type_ref::TypeRef, ContainerId, CrateModuleId, HasModule, ImplId, LocalEnumVariantId, LocalStructFieldId, Lookup, 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 { impl ImplBlock { pub fn target_trait(&self, db: &impl DefDatabase) -> Option { - db.impl_data(self.id).target_trait().cloned() + db.impl_data(self.id).target_trait.clone() } pub fn target_type(&self, db: &impl DefDatabase) -> TypeRef { - db.impl_data(self.id).target_type().clone() + db.impl_data(self.id).target_type.clone() } pub fn target_ty(&self, db: &impl HirDatabase) -> Ty { @@ -35,11 +35,11 @@ impl ImplBlock { } pub fn items(&self, db: &impl DefDatabase) -> Vec { - db.impl_data(self.id).items().iter().map(|it| (*it).into()).collect() + db.impl_data(self.id).items.iter().map(|it| (*it).into()).collect() } pub fn is_negative(&self, db: &impl DefDatabase) -> bool { - db.impl_data(self.id).is_negative() + db.impl_data(self.id).is_negative } 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}; use rustc_hash::FxHashMap; use hir_def::{ - function::FunctionData, + data::FunctionData, path::known, resolver::{HasResolver, Resolver, TypeNs}, type_ref::{Mutability, TypeRef}, -- cgit v1.2.3