aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty')
-rw-r--r--crates/hir_ty/src/traits/chalk/interner.rs5
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 3a6ceef05..d63252382 100644
--- a/crates/hir_ty/src/traits/chalk/interner.rs
+++ b/crates/hir_ty/src/traits/chalk/interner.rs
@@ -56,6 +56,7 @@ impl_internable!(
56 InternedTypeInner, 56 InternedTypeInner,
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); 60);
60 61
61impl chalk_ir::interner::Interner for Interner { 62impl chalk_ir::interner::Interner for Interner {
@@ -71,7 +72,7 @@ impl chalk_ir::interner::Interner for Interner {
71 type InternedProgramClauses = Arc<[chalk_ir::ProgramClause<Self>]>; 72 type InternedProgramClauses = Arc<[chalk_ir::ProgramClause<Self>]>;
72 type InternedQuantifiedWhereClauses = Vec<chalk_ir::QuantifiedWhereClause<Self>>; 73 type InternedQuantifiedWhereClauses = Vec<chalk_ir::QuantifiedWhereClause<Self>>;
73 type InternedVariableKinds = Interned<InternedVariableKindsInner>; 74 type InternedVariableKinds = Interned<InternedVariableKindsInner>;
74 type InternedCanonicalVarKinds = Vec<chalk_ir::CanonicalVarKind<Self>>; 75 type InternedCanonicalVarKinds = Interned<InternedWrapper<Vec<chalk_ir::CanonicalVarKind<Self>>>>;
75 type InternedConstraints = Vec<chalk_ir::InEnvironment<chalk_ir::Constraint<Self>>>; 76 type InternedConstraints = Vec<chalk_ir::InEnvironment<chalk_ir::Constraint<Self>>>;
76 type InternedVariances = Arc<[chalk_ir::Variance]>; 77 type InternedVariances = Arc<[chalk_ir::Variance]>;
77 type DefId = InternId; 78 type DefId = InternId;
@@ -370,7 +371,7 @@ impl chalk_ir::interner::Interner for Interner {
370 &self, 371 &self,
371 data: impl IntoIterator<Item = Result<chalk_ir::CanonicalVarKind<Self>, E>>, 372 data: impl IntoIterator<Item = Result<chalk_ir::CanonicalVarKind<Self>, E>>,
372 ) -> Result<Self::InternedCanonicalVarKinds, E> { 373 ) -> Result<Self::InternedCanonicalVarKinds, E> {
373 data.into_iter().collect() 374 Ok(Interned::new(InternedWrapper(data.into_iter().collect::<Result<_, _>>()?)))
374 } 375 }
375 376
376 fn canonical_var_kinds_data<'a>( 377 fn canonical_var_kinds_data<'a>(