From a5d85a6356dc761d047f46bf04eae09dc9ab80f9 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sun, 23 May 2021 12:52:41 +0200 Subject: Add test for #8931 and better checking --- crates/hir/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir/src/lib.rs') 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 { name: Option<&Name>, mut callback: impl FnMut(&Ty, AssocItem) -> Option, ) -> Option { - let canonical = hir_ty::replace_errors_with_variables(self.ty.clone()); + let canonical = hir_ty::replace_errors_with_variables(&self.ty); let env = self.env.clone(); let krate = krate.id; @@ -2222,7 +2222,7 @@ impl Type { } pub fn could_unify_with(&self, db: &dyn HirDatabase, other: &Type) -> bool { - let tys = hir_ty::replace_errors_with_variables((self.ty.clone(), other.ty.clone())); + let tys = hir_ty::replace_errors_with_variables(&(self.ty.clone(), other.ty.clone())); could_unify(db, self.env.clone(), &tys) } } -- cgit v1.2.3