From 0be68a482581861f4218e0a759e2da71ee19fce6 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 18 Apr 2020 13:36:35 +0200 Subject: Update Chalk, and cache Chalk env elaboration through a query This should fix some of the worst performance problems. --- crates/ra_hir_ty/src/db.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/ra_hir_ty/src/db.rs') diff --git a/crates/ra_hir_ty/src/db.rs b/crates/ra_hir_ty/src/db.rs index 33da16b48..9e5dfeab3 100644 --- a/crates/ra_hir_ty/src/db.rs +++ b/crates/ra_hir_ty/src/db.rs @@ -107,6 +107,13 @@ pub trait HirDatabase: DefDatabase + Upcast { krate: CrateId, goal: crate::Canonical>, ) -> Option; + + #[salsa::invoke(crate::traits::chalk::program_clauses_for_chalk_env_query)] + fn program_clauses_for_chalk_env( + &self, + krate: CrateId, + env: chalk_ir::Environment, + ) -> chalk_ir::ProgramClauses; } fn infer_wait(db: &impl HirDatabase, def: DefWithBodyId) -> Arc { -- cgit v1.2.3