[−][src]Trait rustc_ap_rustc_data_structures::unify::EqUnifyValue
A convenient helper for unification values which must be equal or
else an error occurs. For example, if you are unifying types in a
simple functional language, this may be appropriate, since (e.g.)
you can't unify a type variable bound to int
with one bound to
float
(but you can unify two type variables both bound to
int
).
Any type which implements EqUnifyValue
automatially implements
UnifyValue
; if the two values are equal, merging is permitted.
Otherwise, the error (v1, v2)
is returned, where v1
and v2
are the two unequal values.