aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/autoderef.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-06 22:49:10 +0100
committerGitHub <[email protected]>2021-04-06 22:49:10 +0100
commitfcb22a674df4728742a865dda76ce65f0f9205b1 (patch)
tree9131d26bacbda364c81ad0ace9d4428b0d8e3c33 /crates/hir_ty/src/autoderef.rs
parent31d2b3b9cb75a09c93655b38377ed5f4144ebaf0 (diff)
parentb03969cda92661ad67897fee0ba16c1cc61830ea (diff)
Merge #8387
8387: Remove `SolutionVariables`, add ConstrainedSubst analogous to Chalk r=flodiebold a=flodiebold ... just missing the constraints. Co-authored-by: Florian Diebold <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/autoderef.rs')
-rw-r--r--crates/hir_ty/src/autoderef.rs10
1 files changed, 5 insertions, 5 deletions
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(
120 // assumptions will be broken. We would need to properly introduce 120 // assumptions will be broken. We would need to properly introduce
121 // new variables in that case 121 // new variables in that case
122 122
123 for i in 1..vars.0.binders.len(&Interner) { 123 for i in 1..vars.binders.len(&Interner) {
124 if vars.0.value.at(&Interner, i - 1).assert_ty_ref(&Interner).kind(&Interner) 124 if vars.value.subst.at(&Interner, i - 1).assert_ty_ref(&Interner).kind(&Interner)
125 != &TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, i - 1)) 125 != &TyKind::BoundVar(BoundVar::new(DebruijnIndex::INNERMOST, i - 1))
126 { 126 {
127 warn!("complex solution for derefing {:?}: {:?}, ignoring", ty.goal, solution); 127 warn!("complex solution for derefing {:?}: {:?}, ignoring", ty.goal, solution);
@@ -130,12 +130,12 @@ fn deref_by_trait(
130 } 130 }
131 Some(Canonical { 131 Some(Canonical {
132 value: vars 132 value: vars
133 .0
134 .value 133 .value
135 .at(&Interner, vars.0.value.len(&Interner) - 1) 134 .subst
135 .at(&Interner, vars.value.subst.len(&Interner) - 1)
136 .assert_ty_ref(&Interner) 136 .assert_ty_ref(&Interner)
137 .clone(), 137 .clone(),
138 binders: vars.0.binders.clone(), 138 binders: vars.binders.clone(),
139 }) 139 })
140 } 140 }
141 Solution::Ambig(_) => { 141 Solution::Ambig(_) => {