diff options
author | Florian Diebold <[email protected]> | 2021-05-21 18:50:18 +0100 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2021-05-21 18:51:21 +0100 |
commit | ef558c97d09b0be8639c92f490e5ad380aa04288 (patch) | |
tree | 07e8fa0db2d21f0ab8ebeae635e8b9973c19896c /crates/hir_ty | |
parent | 67f1a08fd8eff669a997950cac6c538dd96718b3 (diff) |
Clean up visibilities
Diffstat (limited to 'crates/hir_ty')
-rw-r--r-- | crates/hir_ty/src/infer/unify.rs | 20 |
1 files changed, 10 insertions, 10 deletions
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<Interner>; | |||
136 | 136 | ||
137 | #[derive(Clone)] | 137 | #[derive(Clone)] |
138 | pub(crate) struct InferenceTable<'a> { | 138 | pub(crate) struct InferenceTable<'a> { |
139 | pub db: &'a dyn HirDatabase, | 139 | pub(crate) db: &'a dyn HirDatabase, |
140 | pub trait_env: Arc<TraitEnvironment>, | 140 | pub(crate) trait_env: Arc<TraitEnvironment>, |
141 | pub(super) var_unification_table: ChalkInferenceTable, | 141 | var_unification_table: ChalkInferenceTable, |
142 | pub(super) type_variable_table: Vec<TypeVariableData>, | 142 | type_variable_table: Vec<TypeVariableData>, |
143 | pending_obligations: Vec<Canonicalized<InEnvironment<Goal>>>, | 143 | pending_obligations: Vec<Canonicalized<InEnvironment<Goal>>>, |
144 | } | 144 | } |
145 | 145 | ||
@@ -332,7 +332,7 @@ impl<'a> InferenceTable<'a> { | |||
332 | self.var_unification_table.normalize_ty_shallow(&Interner, ty).unwrap_or_else(|| ty.clone()) | 332 | self.var_unification_table.normalize_ty_shallow(&Interner, ty).unwrap_or_else(|| ty.clone()) |
333 | } | 333 | } |
334 | 334 | ||
335 | pub fn register_obligation(&mut self, goal: Goal) { | 335 | pub(crate) fn register_obligation(&mut self, goal: Goal) { |
336 | let in_env = InEnvironment::new(&self.trait_env.env, goal); | 336 | let in_env = InEnvironment::new(&self.trait_env.env, goal); |
337 | self.register_obligation_in_env(in_env) | 337 | self.register_obligation_in_env(in_env) |
338 | } | 338 | } |
@@ -344,11 +344,11 @@ impl<'a> InferenceTable<'a> { | |||
344 | } | 344 | } |
345 | } | 345 | } |
346 | 346 | ||
347 | pub fn register_infer_ok(&mut self, infer_ok: InferOk) { | 347 | pub(crate) fn register_infer_ok(&mut self, infer_ok: InferOk) { |
348 | infer_ok.goals.into_iter().for_each(|goal| self.register_obligation_in_env(goal)); | 348 | infer_ok.goals.into_iter().for_each(|goal| self.register_obligation_in_env(goal)); |
349 | } | 349 | } |
350 | 350 | ||
351 | pub fn resolve_obligations_as_possible(&mut self) { | 351 | pub(crate) fn resolve_obligations_as_possible(&mut self) { |
352 | let _span = profile::span("resolve_obligations_as_possible"); | 352 | let _span = profile::span("resolve_obligations_as_possible"); |
353 | let mut changed = true; | 353 | let mut changed = true; |
354 | let mut obligations = Vec::new(); | 354 | let mut obligations = Vec::new(); |
@@ -445,9 +445,9 @@ mod resolve { | |||
445 | use hir_def::type_ref::ConstScalar; | 445 | use hir_def::type_ref::ConstScalar; |
446 | 446 | ||
447 | pub(super) struct Resolver<'a, 'b, F> { | 447 | pub(super) struct Resolver<'a, 'b, F> { |
448 | pub table: &'a mut InferenceTable<'b>, | 448 | pub(super) table: &'a mut InferenceTable<'b>, |
449 | pub var_stack: &'a mut Vec<InferenceVar>, | 449 | pub(super) var_stack: &'a mut Vec<InferenceVar>, |
450 | pub fallback: F, | 450 | pub(super) fallback: F, |
451 | } | 451 | } |
452 | impl<'a, 'b, 'i, F> Folder<'i, Interner> for Resolver<'a, 'b, F> | 452 | impl<'a, 'b, 'i, F> Folder<'i, Interner> for Resolver<'a, 'b, F> |
453 | where | 453 | where |