From 1250ddc5cf58ff0a6bbf7c07e5bd9f7cc7db5a09 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 16 May 2021 15:50:28 +0200 Subject: Rework obligation handling We can't do the easy hack that we did before anymore, where we kept track of whether any inference variables changed since the last time we rechecked obligations. Instead, we store the obligations in canonicalized form; that way we can easily check the inference variables to see whether they have changed since the goal was canonicalized. --- crates/hir_ty/src/db.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/hir_ty/src/db.rs') diff --git a/crates/hir_ty/src/db.rs b/crates/hir_ty/src/db.rs index f773aa621..be5b9110e 100644 --- a/crates/hir_ty/src/db.rs +++ b/crates/hir_ty/src/db.rs @@ -134,14 +134,14 @@ pub trait HirDatabase: DefDatabase + Upcast { fn trait_solve( &self, krate: CrateId, - goal: crate::Canonical>, + goal: crate::Canonical>, ) -> Option; #[salsa::invoke(crate::traits::trait_solve_query)] fn trait_solve_query( &self, krate: CrateId, - goal: crate::Canonical>, + goal: crate::Canonical>, ) -> Option; #[salsa::invoke(chalk_db::program_clauses_for_chalk_env_query)] @@ -168,7 +168,7 @@ fn infer_wait(db: &dyn HirDatabase, def: DefWithBodyId) -> Arc fn trait_solve_wait( db: &dyn HirDatabase, krate: CrateId, - goal: crate::Canonical>, + goal: crate::Canonical>, ) -> Option { let _p = profile::span("trait_solve::wait"); db.trait_solve_query(krate, goal) -- cgit v1.2.3