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]

🔬 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?

🔬 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 diverges flag given when vid was created.

Note that this function does not return care whether vid has been unified with something else or not.

🔬 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 origin that was given when vid was created.

Note that this function does not return care whether vid has been unified with something else or not.

🔬 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.

🔬 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.

🔬 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.

🔬 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?

Creates a new type variable.

  • diverging: indicates if this is a "diverging" type variable, e.g. one created as the type of a return expression. The code in this module doesn't care if a variable is diverging, but the main Rust type-checker will sometimes "unify" such variables with the ! or () types.
  • origin: indicates why the type variable was created. The code in this module doesn't care, but it can be useful for improving error messages.

🔬 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 number of type variables created thus far.

🔬 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).

🔬 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)

🔬 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).

🔬 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 to which vid has been instantiated, if any.

🔬 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?

If t is a type-inference variable, and it has been instantiated, then return the with which it was instantiated. Otherwise, returns t.

🔬 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?

Creates a snapshot of the type variable state. This snapshot must later be committed (commit()) or rolled back (rollback_to()). Nested snapshots are permitted, but must be processed in a stack-like fashion.

🔬 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?

Undoes all changes since the snapshot was created. Any snapshots created since that point must already have been committed or rolled back.

🔬 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?

Commits all changes since the snapshot was created, making them permanent (unless this snapshot was created within another snapshot). Any snapshots created since that point must already have been committed or rolled back.

🔬 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.

Important traits for Vec<u8>

🔬 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}.

Important traits for Vec<u8>

🔬 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 indices of all variables that are not yet instantiated.

Trait Implementations

Auto Trait Implementations

impl<'tcx> !Send for TypeVariableTable<'tcx>

impl<'tcx> !Sync for TypeVariableTable<'tcx>