Struct rustc_lint::middle::infer::type_variable::TypeVariableTable [−] [src]

pub struct TypeVariableTable<'tcx> {
    // some fields omitted
}
Unstable

Methods

impl<'tcx> TypeVariableTable<'tcx>

fn new() -> TypeVariableTable<'tcx>

Unstable

fn var_diverges(&'a self, vid: TyVid) -> bool

Unstable

fn relate_vars(&mut self, a: TyVid, dir: RelationDir, b: TyVid)

Unstable

Records that a <: b, a :> b, or a == b, depending on dir.

Precondition: neither a nor b are known.

fn instantiate_and_push(&mut self, vid: TyVid, ty: &'tcx TyS<'tcx>, stack: &mut Vec<(&'tcx TyS<'tcx>, RelationDir, TyVid)>)

Unstable

Instantiates vid with the type ty and then pushes an entry onto stack for each of the relations of vid to other variables. The relations will have the form (ty, dir, vid1) where vid1 is some other variable id.

fn new_var(&mut self, diverging: bool) -> TyVid

Unstable

fn probe(&self, vid: TyVid) -> Option<&'tcx TyS<'tcx>>

Unstable

fn replace_if_possible(&self, t: &'tcx TyS<'tcx>) -> &'tcx TyS<'tcx>

Unstable

fn snapshot(&mut self) -> Snapshot

Unstable

fn rollback_to(&mut self, s: Snapshot)

Unstable

fn commit(&mut self, s: Snapshot)

Unstable

fn types_escaping_snapshot(&self, s: &Snapshot) -> Vec<&'tcx TyS<'tcx>>

Unstable

Find the set of type variables that existed before s but which have only been unified since s started, and return the types with which they were unified. So if we had a type variable V0, then we started the snapshot, then we created a type variable V1, unifed V0 with T0, and unified V1 with T1, this function would return {T0}.