diff options
author | Aleksey Kladov <[email protected]> | 2019-11-26 15:02:50 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-26 15:02:50 +0000 |
commit | b60b26b8abc9d2bed46278c07415b7b39752040c (patch) | |
tree | f7a6ee3da31c3a0c01f1afdf86d6825e707d0e56 /crates/ra_hir | |
parent | 72d8e7e69abca9f27fb3ea386a6879324741e152 (diff) |
Reduce visibility
Diffstat (limited to 'crates/ra_hir')
-rw-r--r-- | crates/ra_hir/src/ty/traits.rs | 5 | ||||
-rw-r--r-- | crates/ra_hir/src/ty/utils.rs | 4 |
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 @@ | |||
2 | use std::sync::{Arc, Mutex}; | 2 | use std::sync::{Arc, Mutex}; |
3 | 3 | ||
4 | use chalk_ir::{cast::Cast, family::ChalkIr}; | 4 | use chalk_ir::{cast::Cast, family::ChalkIr}; |
5 | use hir_def::DefWithBodyId; | 5 | use hir_def::{expr::ExprId, DefWithBodyId}; |
6 | use log::debug; | 6 | use log::debug; |
7 | use ra_db::{impl_intern_key, salsa}; | 7 | use ra_db::{impl_intern_key, salsa}; |
8 | use ra_prof::profile; | 8 | use ra_prof::profile; |
9 | use rustc_hash::FxHashSet; | 9 | use rustc_hash::FxHashSet; |
10 | 10 | ||
11 | use crate::{db::HirDatabase, Crate, ImplBlock, Trait, TypeAlias}; | ||
12 | |||
11 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; | 13 | use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; |
12 | use crate::{db::HirDatabase, expr::ExprId, Crate, ImplBlock, Trait, TypeAlias}; | ||
13 | 14 | ||
14 | use self::chalk::{from_chalk, ToChalk}; | 15 | use 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). |
36 | pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> { | 36 | pub(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 | ||
55 | pub(crate) fn associated_type_by_name_including_super_traits( | 55 | pub(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, |