Struct rustc_data_structures::unify::UnificationTable [−] [src]

pub struct UnificationTable<K: UnifyKey> {
    // some fields omitted
}
Unstable

Table of unification keys and their values.

Methods

impl<K: UnifyKey> UnificationTable<K>

fn new() -> UnificationTable<K>

Unstable

fn snapshot(&mut self) -> Snapshot<K>

Unstable

Starts a new snapshot. Each snapshot must be either rolled back or committed in a "LIFO" (stack) order.

fn rollback_to(&mut self, snapshot: Snapshot<K>)

Unstable

Reverses all changes since the last snapshot. Also removes any keys that have been created since then.

fn commit(&mut self, snapshot: Snapshot<K>)

Unstable

Commits all changes since the last snapshot. Of course, they can still be undone if there is a snapshot further out.

fn new_key(&mut self, value: K) -> K

Unstable

impl<'tcx, K> UnificationTable<K> where K: UnifyKey<Value=()>

fn union(&mut self, a_id: K, b_id: K)

Unstable

fn find(&mut self, id: K) -> K

Unstable

fn unioned(&mut self, a_id: K, b_id: K) -> bool

Unstable

impl<'tcx, K, V> UnificationTable<K> where K: UnifyKey<Value=Option<V>>, V: Clone + PartialEq

fn unify_var_var(&mut self, a_id: K, b_id: K) -> Result<(), (V, V)>

Unstable

fn unify_var_value(&mut self, a_id: K, b: V) -> Result<(), (V, V)>

Unstable

Sets the value of the key a_id to b. Because simple keys do not have any subtyping relationships, if a_id already has a value, it must be the same as b.

fn has_value(&mut self, id: K) -> bool

Unstable

fn probe(&mut self, a_id: K) -> Option<V>

Unstable