aboutsummaryrefslogtreecommitdiff
path: root/crates/hir
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2021-05-23 11:52:41 +0100
committerFlorian Diebold <[email protected]>2021-05-23 11:52:41 +0100
commita5d85a6356dc761d047f46bf04eae09dc9ab80f9 (patch)
treec02c9f04b9f1ef694d2a1e0680e137e060a7cda2 /crates/hir
parentbc1ba1549d97e7d5ddceb16b7238ae8aab5794d0 (diff)
Add test for #8931 and better checking
Diffstat (limited to 'crates/hir')
-rw-r--r--crates/hir/src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 52d72c3c5..800101c91 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -2053,7 +2053,7 @@ impl Type {
2053 name: Option<&Name>, 2053 name: Option<&Name>,
2054 mut callback: impl FnMut(&Ty, AssocItem) -> Option<T>, 2054 mut callback: impl FnMut(&Ty, AssocItem) -> Option<T>,
2055 ) -> Option<T> { 2055 ) -> Option<T> {
2056 let canonical = hir_ty::replace_errors_with_variables(self.ty.clone()); 2056 let canonical = hir_ty::replace_errors_with_variables(&self.ty);
2057 2057
2058 let env = self.env.clone(); 2058 let env = self.env.clone();
2059 let krate = krate.id; 2059 let krate = krate.id;
@@ -2222,7 +2222,7 @@ impl Type {
2222 } 2222 }
2223 2223
2224 pub fn could_unify_with(&self, db: &dyn HirDatabase, other: &Type) -> bool { 2224 pub fn could_unify_with(&self, db: &dyn HirDatabase, other: &Type) -> bool {
2225 let tys = hir_ty::replace_errors_with_variables((self.ty.clone(), other.ty.clone())); 2225 let tys = hir_ty::replace_errors_with_variables(&(self.ty.clone(), other.ty.clone()));
2226 could_unify(db, self.env.clone(), &tys) 2226 could_unify(db, self.env.clone(), &tys)
2227 } 2227 }
2228} 2228}