struct Conflicts<'a> {
    relevant_locals: &'a BitSet<Local>,
    matrix: BitMatrix<Local, Local>,
    unify_cache: BitSet<Local>,
    unified_locals: InPlaceUnificationTable<UnifyLocal>,
}

Fields

relevant_locals: &'a BitSet<Local>matrix: BitMatrix<Local, Local>

The conflict matrix. It is always symmetric and the adjacency matrix of the corresponding conflict graph.

unify_cache: BitSet<Local>

Preallocated BitSet used by unify.

unified_locals: InPlaceUnificationTable<UnifyLocal>

Tracks locals that have been merged together to prevent cycles and propagate conflicts.

Implementations

Records locals that must not overlap during the evaluation of stmt. These locals conflict and must not be merged.

Checks whether a and b may be merged. Returns false if there’s a conflict.

Merges the conflicts of a and b, so that each one inherits all conflicts of the other.

can_unify must have returned true for the same locals, or this may panic or lead to miscompiles.

This is called when the pass makes the decision to unify a and b (or parts of a and b) and is needed to ensure that future unification decisions take potentially newly introduced conflicts into account.

For an example, assume we have locals _0, _1, _2, and _3. There are these conflicts:

  • _0 <-> _1
  • _1 <-> _2
  • _3 <-> _0

We then decide to merge _2 with _3 since they don’t conflict. Then we decide to merge _2 with _0, which also doesn’t have a conflict in the above list. However _2 is now _3, which does conflict with _0.

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

Returns the argument unchanged.

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.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 136 bytes