aboutsummaryrefslogtreecommitdiff
path: root/crates/hir/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir/src')
-rw-r--r--crates/hir/src/lib.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 21b1a8e4a..1429384cb 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2051,11 +2051,7 @@ impl Type {
2051 name: Option<&Name>, 2051 name: Option<&Name>,
2052 mut callback: impl FnMut(&Ty, AssocItem) -> Option<T>, 2052 mut callback: impl FnMut(&Ty, AssocItem) -> Option<T>,
2053 ) -> Option<T> { 2053 ) -> Option<T> {
2054 // There should be no inference vars in types passed here 2054 let canonical = hir_ty::replace_errors_with_variables(self.ty.clone());
2055 // FIXME check that?
2056 // FIXME replace Unknown by bound vars here
2057 let canonical =
2058 Canonical { value: self.ty.clone(), binders: CanonicalVarKinds::empty(&Interner) };
2059 2055
2060 let env = self.env.clone(); 2056 let env = self.env.clone();
2061 let krate = krate.id; 2057 let krate = krate.id;
@@ -2224,7 +2220,8 @@ impl Type {
2224 } 2220 }
2225 2221
2226 pub fn could_unify_with(&self, db: &dyn HirDatabase, other: &Type) -> bool { 2222 pub fn could_unify_with(&self, db: &dyn HirDatabase, other: &Type) -> bool {
2227 could_unify(db, self.env.clone(), &self.ty, &other.ty) 2223 let tys = hir_ty::replace_errors_with_variables((self.ty.clone(), other.ty.clone()));
2224 could_unify(db, self.env.clone(), &tys)
2228 } 2225 }
2229} 2226}
2230 2227