From ef558c97d09b0be8639c92f490e5ad380aa04288 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 21 May 2021 19:50:18 +0200 Subject: Clean up visibilities --- crates/hir_ty/src/infer/unify.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates') diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs index 4987795e0..21d3fb54e 100644 --- a/crates/hir_ty/src/infer/unify.rs +++ b/crates/hir_ty/src/infer/unify.rs @@ -136,10 +136,10 @@ type ChalkInferenceTable = chalk_solve::infer::InferenceTable; #[derive(Clone)] pub(crate) struct InferenceTable<'a> { - pub db: &'a dyn HirDatabase, - pub trait_env: Arc, - pub(super) var_unification_table: ChalkInferenceTable, - pub(super) type_variable_table: Vec, + pub(crate) db: &'a dyn HirDatabase, + pub(crate) trait_env: Arc, + var_unification_table: ChalkInferenceTable, + type_variable_table: Vec, pending_obligations: Vec>>, } @@ -332,7 +332,7 @@ impl<'a> InferenceTable<'a> { self.var_unification_table.normalize_ty_shallow(&Interner, ty).unwrap_or_else(|| ty.clone()) } - pub fn register_obligation(&mut self, goal: Goal) { + pub(crate) fn register_obligation(&mut self, goal: Goal) { let in_env = InEnvironment::new(&self.trait_env.env, goal); self.register_obligation_in_env(in_env) } @@ -344,11 +344,11 @@ impl<'a> InferenceTable<'a> { } } - pub fn register_infer_ok(&mut self, infer_ok: InferOk) { + pub(crate) fn register_infer_ok(&mut self, infer_ok: InferOk) { infer_ok.goals.into_iter().for_each(|goal| self.register_obligation_in_env(goal)); } - pub fn resolve_obligations_as_possible(&mut self) { + pub(crate) fn resolve_obligations_as_possible(&mut self) { let _span = profile::span("resolve_obligations_as_possible"); let mut changed = true; let mut obligations = Vec::new(); @@ -445,9 +445,9 @@ mod resolve { use hir_def::type_ref::ConstScalar; pub(super) struct Resolver<'a, 'b, F> { - pub table: &'a mut InferenceTable<'b>, - pub var_stack: &'a mut Vec, - pub fallback: F, + pub(super) table: &'a mut InferenceTable<'b>, + pub(super) var_stack: &'a mut Vec, + pub(super) fallback: F, } impl<'a, 'b, 'i, F> Folder<'i, Interner> for Resolver<'a, 'b, F> where -- cgit v1.2.3