Reduce visibility

This commit is contained in:
Aleksey Kladov 2019-11-26 18:02:50 +03:00
parent 72d8e7e69a
commit b60b26b8ab
2 changed files with 5 additions and 4 deletions

View file

@ -2,14 +2,15 @@
use std::sync::{Arc, Mutex}; use std::sync::{Arc, Mutex};
use chalk_ir::{cast::Cast, family::ChalkIr}; use chalk_ir::{cast::Cast, family::ChalkIr};
use hir_def::DefWithBodyId; use hir_def::{expr::ExprId, DefWithBodyId};
use log::debug; use log::debug;
use ra_db::{impl_intern_key, salsa}; use ra_db::{impl_intern_key, salsa};
use ra_prof::profile; use ra_prof::profile;
use rustc_hash::FxHashSet; use rustc_hash::FxHashSet;
use crate::{db::HirDatabase, Crate, ImplBlock, Trait, TypeAlias};
use super::{Canonical, GenericPredicate, HirDisplay, ProjectionTy, TraitRef, Ty, TypeWalk}; 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}; use self::chalk::{from_chalk, ToChalk};

View file

@ -33,7 +33,7 @@ fn direct_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> {
/// Returns an iterator over the whole super trait hierarchy (including the /// Returns an iterator over the whole super trait hierarchy (including the
/// trait itself). /// trait itself).
pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> { pub(super) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<TraitId> {
// we need to take care a bit here to avoid infinite loops in case of cycles // 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;`) // (i.e. if we have `trait A: B; trait B: A;`)
let mut result = vec![trait_]; let mut result = vec![trait_];
@ -52,7 +52,7 @@ pub(crate) fn all_super_traits(db: &impl DefDatabase, trait_: TraitId) -> Vec<Tr
result result
} }
pub(crate) fn associated_type_by_name_including_super_traits( pub(super) fn associated_type_by_name_including_super_traits(
db: &impl DefDatabase, db: &impl DefDatabase,
trait_: TraitId, trait_: TraitId,
name: &Name, name: &Name,