From b60b26b8abc9d2bed46278c07415b7b39752040c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 26 Nov 2019 18:02:50 +0300 Subject: Reduce visibility --- crates/ra_hir/src/ty/traits.rs | 5 +++-- crates/ra_hir/src/ty/utils.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'crates') 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 @@ use std::sync::{Arc, Mutex}; use chalk_ir::{cast::Cast, family::ChalkIr}; -use hir_def::DefWithBodyId; +use hir_def::{expr::ExprId, DefWithBodyId}; use log::debug; use ra_db::{impl_intern_key, salsa}; use ra_prof::profile; use rustc_hash::FxHashSet; +use crate::{db::HirDatabase, Crate, ImplBlock, Trait, TypeAlias}; + use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; -use crate::{db::HirDatabase, expr::ExprId, Crate, ImplBlock, Trait, TypeAlias}; use self::chalk::{from_chalk, ToChalk}; 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 { /// Returns an iterator over the whole super trait hierarchy (including the /// trait itself). -pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec { +pub(super) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec { // we need to take care a bit here to avoid infinite loops in case of cycles // (i.e. if we have `trait A: B; trait B: A;`) let mut result = vec![trait_]; @@ -52,7 +52,7 @@ pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec