struct AntiUnifier<'infer, I: Interner> {
    infer: &'infer mut InferenceTable<I>,
    universe: UniverseIndex,
    interner: I,
}
Expand description

Anti-unification is the act of taking two things that do not unify and finding a minimal generalization of them. So for example Vec<u32> anti-unified with Vec<i32> might be Vec<?X>. This is a very simplistic anti-unifier.

NOTE: The values here are canonicalized, but output is not, this means that any escaping bound variables that we see have to be replaced with inference variables.

Fields

infer: &'infer mut InferenceTable<I>universe: UniverseIndexinterner: I

Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Cast a value to type U using CastTo.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more