From 743faa21e74cc5b627935e2c4c3365807a5c722f Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Fri, 9 Apr 2021 14:11:37 +0200 Subject: Reorganize hir_ty modules Chalk isn't really a 'traits' thing anymore, so it doesn't make sense to have all the Chalk-related stuff in submodules of `traits`. --- crates/hir_ty/src/traits.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'crates/hir_ty/src/traits.rs') diff --git a/crates/hir_ty/src/traits.rs b/crates/hir_ty/src/traits.rs index 1cda72d22..5f8666d90 100644 --- a/crates/hir_ty/src/traits.rs +++ b/crates/hir_ty/src/traits.rs @@ -9,20 +9,16 @@ use stdx::panic_context; use crate::{ db::HirDatabase, AliasEq, AliasTy, Canonical, DomainGoal, Guidance, HirDisplay, InEnvironment, - Solution, TraitRefExt, Ty, TyKind, WhereClause, + Solution, TraitRefExt, Ty, TyKind, WhereClause, Interner, }; -use self::chalk::Interner; - -pub(crate) mod chalk; - /// This controls how much 'time' we give the Chalk solver before giving up. const CHALK_SOLVER_FUEL: i32 = 100; #[derive(Debug, Copy, Clone)] -struct ChalkContext<'a> { - db: &'a dyn HirDatabase, - krate: CrateId, +pub(crate) struct ChalkContext<'a> { + pub(crate) db: &'a dyn HirDatabase, + pub(crate) krate: CrateId, } fn create_chalk_solver() -> chalk_recursive::RecursiveSolver { @@ -148,7 +144,7 @@ fn solve( // don't set the TLS for Chalk unless Chalk debugging is active, to make // extra sure we only use it for debugging let solution = - if is_chalk_debug() { chalk::tls::set_current_program(db, solve) } else { solve() }; + if is_chalk_debug() { crate::tls::set_current_program(db, solve) } else { solve() }; solution } -- cgit v1.2.3