aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-11-26 15:02:50 +0000
committerAleksey Kladov <[email protected]>2019-11-26 15:02:50 +0000
commitb60b26b8abc9d2bed46278c07415b7b39752040c (patch)
treef7a6ee3da31c3a0c01f1afdf86d6825e707d0e56 /crates/ra_hir/src
parent72d8e7e69abca9f27fb3ea386a6879324741e152 (diff)
Reduce visibility
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/ty/traits.rs5
-rw-r--r--crates/ra_hir/src/ty/utils.rs4
2 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_hir/src/ty/traits.rs b/crates/ra_hir/src/ty/traits.rs
index 2eeb03099..a91c2476b 100644
--- a/crates/ra_hir/src/ty/traits.rs
+++ b/crates/ra_hir/src/ty/traits.rs
@@ -2,14 +2,15 @@
2use std::sync::{Arc, Mutex}; 2use std::sync::{Arc, Mutex};
3 3
4use chalk_ir::{cast::Cast, family::ChalkIr}; 4use chalk_ir::{cast::Cast, family::ChalkIr};
5use hir_def::DefWithBodyId; 5use hir_def::{expr::ExprId, DefWithBodyId};
6use log::debug; 6use log::debug;
7use ra_db::{impl_intern_key, salsa}; 7use ra_db::{impl_intern_key, salsa};
8use ra_prof::profile; 8use ra_prof::profile;
9use rustc_hash::FxHashSet; 9use rustc_hash::FxHashSet;
10 10
11use crate::{db::HirDatabase, Crate, ImplBlock, Trait, TypeAlias};
12
11use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; 13use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk};
12use crate::{db::HirDatabase, expr::ExprId, Crate, ImplBlock, Trait, TypeAlias};
13 14
14use self::chalk::{from_chalk, ToChalk}; 15use self::chalk::{from_chalk, ToChalk};
15 16
diff --git a/crates/ra_hir/src/ty/utils.rs b/crates/ra_hir/src/ty/utils.rs
index 52994b9e3..80ffceb4b 100644
--- a/crates/ra_hir/src/ty/utils.rs
+++ b/crates/ra_hir/src/ty/utils.rs
@@ -33,7 +33,7 @@ fn direct_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> {
33 33
34/// Returns an iterator over the whole super trait hierarchy (including the 34/// Returns an iterator over the whole super trait hierarchy (including the
35/// trait itself). 35/// trait itself).
36pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> { 36pub(super) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> {
37 // we need to take care a bit here to avoid infinite loops in case of cycles 37 // we need to take care a bit here to avoid infinite loops in case of cycles
38 // (i.e. if we have `trait A: B; trait B: A;`) 38 // (i.e. if we have `trait A: B; trait B: A;`)
39 let mut result = vec![trait_]; 39 let mut result = vec![trait_];
@@ -52,7 +52,7 @@ pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<Tr
52 result 52 result
53} 53}
54 54
55pub(crate) fn associated_type_by_name_including_super_traits( 55pub(super) fn associated_type_by_name_including_super_traits(
56 db: &impl DefDatabase, 56 db: &impl DefDatabase,
57 trait_: TraitId, 57 trait_: TraitId,
58 name: &Name, 58 name: &Name,