Function ra_ap_hir_ty::could_unify

source ·
pub fn could_unify(
    db: &dyn HirDatabase,
    env: Arc<TraitEnvironment>,
    tys: &Canonical<(Ty, Ty)>
) -> bool
Expand description

Check if types unify.

Note that we consider placeholder types to unify with everything. This means that there may be some unresolved goals that actually set bounds for the placeholder type for the types to unify. For example Option<T> and Option<U> unify although there is unresolved goal T = U.