diff options
Diffstat (limited to 'crates/hir_ty/src')
-rw-r--r-- | crates/hir_ty/src/traits/chalk/interner.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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!( | |||
57 | InternedWrapper<chalk_ir::LifetimeData<Interner>>, | 57 | InternedWrapper<chalk_ir::LifetimeData<Interner>>, |
58 | InternedWrapper<chalk_ir::ConstData<Interner>>, | 58 | InternedWrapper<chalk_ir::ConstData<Interner>>, |
59 | InternedWrapper<Vec<chalk_ir::CanonicalVarKind<Interner>>>, | 59 | InternedWrapper<Vec<chalk_ir::CanonicalVarKind<Interner>>>, |
60 | InternedWrapper<Vec<chalk_ir::ProgramClause<Interner>>>, | ||
60 | ); | 61 | ); |
61 | 62 | ||
62 | impl chalk_ir::interner::Interner for Interner { | 63 | impl chalk_ir::interner::Interner for Interner { |
@@ -69,7 +70,7 @@ impl chalk_ir::interner::Interner for Interner { | |||
69 | type InternedGoals = Vec<Goal<Self>>; | 70 | type InternedGoals = Vec<Goal<Self>>; |
70 | type InternedSubstitution = Interned<InternedSubstitutionInner>; | 71 | type InternedSubstitution = Interned<InternedSubstitutionInner>; |
71 | type InternedProgramClause = Arc<chalk_ir::ProgramClauseData<Self>>; | 72 | type InternedProgramClause = Arc<chalk_ir::ProgramClauseData<Self>>; |
72 | type InternedProgramClauses = Arc<[chalk_ir::ProgramClause<Self>]>; | 73 | type InternedProgramClauses = Interned<InternedWrapper<Vec<chalk_ir::ProgramClause<Self>>>>; |
73 | type InternedQuantifiedWhereClauses = Vec<chalk_ir::QuantifiedWhereClause<Self>>; | 74 | type InternedQuantifiedWhereClauses = Vec<chalk_ir::QuantifiedWhereClause<Self>>; |
74 | type InternedVariableKinds = Interned<InternedVariableKindsInner>; | 75 | type InternedVariableKinds = Interned<InternedVariableKindsInner>; |
75 | type InternedCanonicalVarKinds = Interned<InternedWrapper<Vec<chalk_ir::CanonicalVarKind<Self>>>>; | 76 | type InternedCanonicalVarKinds = Interned<InternedWrapper<Vec<chalk_ir::CanonicalVarKind<Self>>>>; |
@@ -327,7 +328,7 @@ impl chalk_ir::interner::Interner for Interner { | |||
327 | &self, | 328 | &self, |
328 | data: impl IntoIterator<Item = Result<chalk_ir::ProgramClause<Self>, E>>, | 329 | data: impl IntoIterator<Item = Result<chalk_ir::ProgramClause<Self>, E>>, |
329 | ) -> Result<Self::InternedProgramClauses, E> { | 330 | ) -> Result<Self::InternedProgramClauses, E> { |
330 | data.into_iter().collect() | 331 | Ok(Interned::new(InternedWrapper(data.into_iter().collect::<Result<_, _>>()?))) |
331 | } | 332 | } |
332 | 333 | ||
333 | fn program_clauses_data<'a>( | 334 | fn program_clauses_data<'a>( |