Struct rustc::infer::type_variable::TypeVariableTable
[−]
[src]
pub struct TypeVariableTable<'tcx> { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'tcx> TypeVariableTable<'tcx>
[src]
pub fn new() -> TypeVariableTable<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn default(&self, vid: TyVid) -> Option<Default<'tcx>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn var_diverges<'a>(&'a self, vid: TyVid) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn var_origin(&self, vid: TyVid) -> &TypeVariableOrigin
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn equate(&mut self, a: TyVid, b: TyVid)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Records that a == b
, depending on dir
.
Precondition: neither a
nor b
are known.
pub fn sub(&mut self, a: TyVid, b: TyVid)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Records that a <: b
, depending on dir
.
Precondition: neither a
nor b
are known.
pub fn instantiate(&mut self, vid: TyVid, ty: Ty<'tcx>)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Instantiates vid
with the type ty
.
Precondition: vid
must not have been previously instantiated.
pub fn new_var(
&mut self,
diverging: bool,
origin: TypeVariableOrigin,
default: Option<Default<'tcx>>
) -> TyVid
[src]
&mut self,
diverging: bool,
origin: TypeVariableOrigin,
default: Option<Default<'tcx>>
) -> TyVid
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn num_vars(&self) -> usize
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn root_var(&mut self, vid: TyVid) -> TyVid
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns the "root" variable of vid
in the eq_relations
equivalence table. All type variables that have been equated
will yield the same root variable (per the union-find
algorithm), so root_var(a) == root_var(b)
implies that a == b
(transitively).
pub fn sub_root_var(&mut self, vid: TyVid) -> TyVid
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns the "root" variable of vid
in the sub_relations
equivalence table. All type variables that have been are
related via equality or subtyping will yield the same root
variable (per the union-find algorithm), so sub_root_var(a) == sub_root_var(b)
implies that:
exists X. (a <: X || X <: a) && (b <: X || X <: b)
pub fn sub_unified(&mut self, a: TyVid, b: TyVid) -> bool
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
True if a
and b
have same "sub-root" (i.e., exists some
type X such that forall i in {a, b}. (i <: X || X <: i)
.
pub fn probe(&mut self, vid: TyVid) -> Option<Ty<'tcx>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn origin(&self, vid: TyVid) -> TypeVariableOrigin
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn probe_root(&mut self, vid: TyVid) -> Option<Ty<'tcx>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Retrieves the type of vid
given that it is currently a root in the unification table
pub fn replace_if_possible(&mut self, t: Ty<'tcx>) -> Ty<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn snapshot(&mut self) -> Snapshot
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn rollback_to(&mut self, s: Snapshot)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn commit(&mut self, s: Snapshot)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn types_created_since_snapshot(&mut self, s: &Snapshot) -> TypeVariableMap
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns a map {V1 -> V2}
, where the keys {V1}
are
ty-variables created during the snapshot, and the values
{V2}
are the root variables that they were unified with,
along with their origin.
pub fn types_escaping_snapshot(&mut self, s: &Snapshot) -> Vec<Ty<'tcx>>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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}
.
pub fn unsolved_variables(&mut self) -> Vec<TyVid>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?