# Trait rustc_mir_dataflow::lattice::JoinSemiLattice

source ·

    pub trait JoinSemiLattice: Eq {
        // Required method
        fn join(&mut self, other: &Self) -> bool;
    }

Expand description

A partially ordered set that has a least upper bound for any pair of elements in the set.

## Required Methods§

source

#### fn join(&mut self, other: &Self) -> bool

Computes the least upper bound of two elements, storing the result in `self` and returning `true` if `self` has changed.

The lattice join operator is abbreviated as `∨`.

## Object Safety§

This trait is not object safe.

## Implementations on Foreign Types§

source§

### impl JoinSemiLattice for bool

A `bool` is a “two-point” lattice with `true` as the top element and `false` as the bottom:

         true
           |
         false

source§

#### fn join(&mut self, other: &Self) -> bool

source§

### impl<I: Idx, T: JoinSemiLattice> JoinSemiLattice for IndexVec<I, T>

A tuple (or list) of lattices is itself a lattice whose least upper bound is the concatenation of the least upper bounds of each element of the tuple (or list).

In other words: (A₀, A₁, …, Aₙ) ∨ (B₀, B₁, …, Bₙ) = (A₀∨B₀, A₁∨B₁, …, Aₙ∨Bₙ)

source§

#### fn join(&mut self, other: &Self) -> bool

source§

### impl<T: Idx> JoinSemiLattice for BitSet<T>

A `BitSet` represents the lattice formed by the powerset of all possible values of the index type `T` ordered by inclusion. Equivalently, it is a tuple of “two-point” lattices, one for each possible value of `T`.

source§

#### fn join(&mut self, other: &Self) -> bool

source§

### impl<T: Idx> JoinSemiLattice for ChunkedBitSet<T>

source§

#### fn join(&mut self, other: &Self) -> bool

## Implementors§

source§

### impl<T: Clone + Eq> JoinSemiLattice for FlatSet<T>

source§

### impl<T: JoinSemiLattice + Clone> JoinSemiLattice for MaybeReachable<T>

source§

### impl<T: MeetSemiLattice> JoinSemiLattice for Dual<T>

source§

### impl<V: JoinSemiLattice + Clone> JoinSemiLattice for State<V>