Struct rustc_typeck::middle::infer::unify::UnificationTableUnstable
[-] [+]
[src]
pub struct UnificationTable<K> where K: UnifyKey {
// some fields omitted
}
Table of unification keys and their values.
Methods
impl<K> UnificationTable<K> where K: UnifyKey
fn new() -> UnificationTable<K>
fn snapshot(&mut self) -> Snapshot<K>
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>)
Reverses all changes since the last snapshot. Also removes any keys that have been created since then.
fn commit(&mut self, snapshot: Snapshot<K>)
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::Value) -> K
impl<'tcx, K, V> UnificationTable<K> where K: UnifyKey<Value=Option<V>>, V: Clone + PartialEq<V>, Option<V>: UnifyValue
fn unify_var_var(&mut self, a_id: K, b_id: K) -> Result<(), (V, V)>
fn unify_var_value(&mut self, a_id: K, b: V) -> Result<(), (V, V)>
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
.