From 15b0b55b4e73fb25d94dd9bcc49a2b4ed5156dc1 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Thu, 8 Apr 2021 20:13:21 +0200 Subject: Intern ProgramClauses --- crates/hir_ty/src/traits/chalk/interner.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/hir_ty/src/traits/chalk') diff --git a/crates/hir_ty/src/traits/chalk/interner.rs b/crates/hir_ty/src/traits/chalk/interner.rs index d63252382..11fa2622d 100644 --- a/crates/hir_ty/src/traits/chalk/interner.rs +++ b/crates/hir_ty/src/traits/chalk/interner.rs @@ -57,6 +57,7 @@ impl_internable!( InternedWrapper>, InternedWrapper>, InternedWrapper>>, + InternedWrapper>>, ); impl chalk_ir::interner::Interner for Interner { @@ -69,7 +70,7 @@ impl chalk_ir::interner::Interner for Interner { type InternedGoals = Vec>; type InternedSubstitution = Interned; type InternedProgramClause = Arc>; - type InternedProgramClauses = Arc<[chalk_ir::ProgramClause]>; + type InternedProgramClauses = Interned>>>; type InternedQuantifiedWhereClauses = Vec>; type InternedVariableKinds = Interned; type InternedCanonicalVarKinds = Interned>>>; @@ -327,7 +328,7 @@ impl chalk_ir::interner::Interner for Interner { &self, data: impl IntoIterator, E>>, ) -> Result { - data.into_iter().collect() + Ok(Interned::new(InternedWrapper(data.into_iter().collect::>()?))) } fn program_clauses_data<'a>( -- cgit v1.2.3