From b03969cda92661ad67897fee0ba16c1cc61830ea Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Tue, 6 Apr 2021 23:46:32 +0200 Subject: Remove `SolutionVariables`, add ConstrainedSubst analogous to Chalk ... just missing the constraints. --- crates/hir_ty/src/autoderef.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir_ty/src/autoderef.rs') diff --git a/crates/hir_ty/src/autoderef.rs b/crates/hir_ty/src/autoderef.rs index c5890e24d..80e192a57 100644 --- a/crates/hir_ty/src/autoderef.rs +++ b/crates/hir_ty/src/autoderef.rs @@ -120,8 +120,8 @@ fn deref_by_trait( // assumptions will be broken. We would need to properly introduce // new variables in that case - for i in 1..vars.0.binders.len(&Interner) { - if vars.0.value.at(&Interner, i - 1).assert_ty_ref(&Interner).kind(&Interner) + for i in 1..vars.binders.len(&Interner) { + if vars.value.subst.at(&Interner, i - 1).assert_ty_ref(&Interner).kind(&Interner) != &TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, i - 1)) { warn!("complex solution for derefing {:?}: {:?}, ignoring", ty.goal, solution); @@ -130,12 +130,12 @@ fn deref_by_trait( } Some(Canonical { value: vars - .0 .value - .at(&Interner, vars.0.value.len(&Interner) - 1) + .subst + .at(&Interner, vars.value.subst.len(&Interner) - 1) .assert_ty_ref(&Interner) .clone(), - binders: vars.0.binders.clone(), + binders: vars.binders.clone(), }) } Solution::Ambig(_) => { -- cgit v1.2.3