aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r--crates/hir_ty/src/infer/unify.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/hir_ty/src/infer/unify.rs b/crates/hir_ty/src/infer/unify.rs
index 56e06b7d0..d8edfb4e9 100644
--- a/crates/hir_ty/src/infer/unify.rs
+++ b/crates/hir_ty/src/infer/unify.rs
@@ -86,8 +86,12 @@ impl<T: HasInterner<Interner = Interner>> Canonicalized<T> {
86 } 86 }
87} 87}
88 88
89pub fn could_unify(db: &dyn HirDatabase, env: Arc<TraitEnvironment>, t1: &Ty, t2: &Ty) -> bool { 89pub fn could_unify(
90 InferenceTable::new(db, env).unify(t1, t2) 90 db: &dyn HirDatabase,
91 env: Arc<TraitEnvironment>,
92 tys: &Canonical<(Ty, Ty)>,
93) -> bool {
94 unify(db, env, tys).is_some()
91} 95}
92 96
93pub(crate) fn unify( 97pub(crate) fn unify(