aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/traits/chalk.rs
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-04-05 16:45:18 +0100
committerFlorian Diebold <[email protected]>2021-04-05 18:19:18 +0100
commitad20f00844cec9c794e34869be163673ebbed182 (patch)
tree0f37d26295bc9a8372d09df1612bd08a6d19ff72 /crates/hir_ty/src/traits/chalk.rs
parent69714d36e6617800f3edea174f5d6f76c985ad4c (diff)
Use VariableKinds in Binders
Diffstat (limited to 'crates/hir_ty/src/traits/chalk.rs')
-rw-r--r--crates/hir_ty/src/traits/chalk.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir_ty/src/traits/chalk.rs b/crates/hir_ty/src/traits/chalk.rs
index 47867f77e..dff87ef70 100644
--- a/crates/hir_ty/src/traits/chalk.rs
+++ b/crates/hir_ty/src/traits/chalk.rs
@@ -184,7 +184,8 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
184 .db 184 .db
185 .return_type_impl_traits(func) 185 .return_type_impl_traits(func)
186 .expect("impl trait id without impl traits"); 186 .expect("impl trait id without impl traits");
187 let data = &datas.skip_binders().impl_traits[idx as usize]; 187 let (datas, binders) = (*datas).as_ref().into_value_and_skipped_binders();
188 let data = &datas.impl_traits[idx as usize];
188 let bound = OpaqueTyDatumBound { 189 let bound = OpaqueTyDatumBound {
189 bounds: make_binders( 190 bounds: make_binders(
190 data.bounds 191 data.bounds
@@ -197,8 +198,7 @@ impl<'a> chalk_solve::RustIrDatabase<Interner> for ChalkContext<'a> {
197 ), 198 ),
198 where_clauses: make_binders(vec![], 0), 199 where_clauses: make_binders(vec![], 0),
199 }; 200 };
200 let num_vars = datas.num_binders; 201 chalk_ir::Binders::new(binders, bound)
201 make_binders(bound, num_vars)
202 } 202 }
203 crate::ImplTraitId::AsyncBlockTypeImplTrait(..) => { 203 crate::ImplTraitId::AsyncBlockTypeImplTrait(..) => {
204 if let Some((future_trait, future_output)) = self 204 if let Some((future_trait, future_output)) = self
@@ -626,7 +626,7 @@ fn type_alias_associated_ty_value(
626 let value = rust_ir::AssociatedTyValue { 626 let value = rust_ir::AssociatedTyValue {
627 impl_id: impl_id.to_chalk(db), 627 impl_id: impl_id.to_chalk(db),
628 associated_ty_id: to_assoc_type_id(assoc_ty), 628 associated_ty_id: to_assoc_type_id(assoc_ty),
629 value: make_binders(value_bound, binders), 629 value: chalk_ir::Binders::new(binders, value_bound),
630 }; 630 };
631 Arc::new(value) 631 Arc::new(value)
632} 632}
@@ -656,7 +656,7 @@ pub(crate) fn fn_def_datum_query(
656 let datum = FnDefDatum { 656 let datum = FnDefDatum {
657 id: fn_def_id, 657 id: fn_def_id,
658 sig: chalk_ir::FnSig { abi: (), safety: chalk_ir::Safety::Safe, variadic: sig.is_varargs }, 658 sig: chalk_ir::FnSig { abi: (), safety: chalk_ir::Safety::Safe, variadic: sig.is_varargs },
659 binders: make_binders(bound, binders), 659 binders: chalk_ir::Binders::new(binders, bound),
660 }; 660 };
661 Arc::new(datum) 661 Arc::new(datum)
662} 662}