From 48c492af7ec8ff6af4fe2b38f83aa007c9f7f0b8 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 15 May 2021 20:18:54 +0200 Subject: Fix compilation of hir and ide crates --- crates/hir/src/lib.rs | 4 ++-- crates/ide_completion/src/render.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index d443b124c..21b1a8e4a 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -2223,8 +2223,8 @@ impl Type { walk_type(db, self, &mut cb); } - pub fn could_unify_with(&self, other: &Type) -> bool { - could_unify(&self.ty, &other.ty) + pub fn could_unify_with(&self, db: &dyn HirDatabase, other: &Type) -> bool { + could_unify(db, self.env.clone(), &self.ty, &other.ty) } } diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs index 1a762d3dc..6b04ee164 100644 --- a/crates/ide_completion/src/render.rs +++ b/crates/ide_completion/src/render.rs @@ -323,7 +323,7 @@ fn compute_type_match( if completion_ty == expected_type { Some(CompletionRelevanceTypeMatch::Exact) - } else if expected_type.could_unify_with(completion_ty) { + } else if expected_type.could_unify_with(ctx.db, completion_ty) { Some(CompletionRelevanceTypeMatch::CouldUnify) } else { None -- cgit v1.2.3