Enum rustc_infer::infer::canonical::CanonicalVarKind[][src]

pub enum CanonicalVarKind<'tcx> {
    Ty(CanonicalTyVarKind),
    PlaceholderTy(Placeholder<BoundVar>),
    Region(UniverseIndex),
    PlaceholderRegion(Placeholder<BoundRegionKind>),
    Const(UniverseIndex),
    PlaceholderConst(Placeholder<BoundConst>),
}
Expand description

Describes the “kind” of the canonical variable. This is a “kind” in the type-theory sense of the term – i.e., a “meta” type system that analyzes type-like values.

Variants

Ty(CanonicalTyVarKind)

Tuple Fields

Some kind of type inference variable.

PlaceholderTy(Placeholder<BoundVar>)

Tuple Fields

A “placeholder” that represents “any type”.

Region(UniverseIndex)

Tuple Fields

Region variable '?R.

PlaceholderRegion(Placeholder<BoundRegionKind>)

Tuple Fields

A “placeholder” that represents “any region”. Created when you are solving a goal like for<'a> T: Foo<'a> to represent the bound region 'a.

Const(UniverseIndex)

Tuple Fields

Some kind of const inference variable.

PlaceholderConst(Placeholder<BoundConst>)

Tuple Fields

A “placeholder” that represents “any const”.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes

Size for each variant:

  • Ty: 4 bytes
  • PlaceholderTy: 8 bytes
  • Region: 4 bytes
  • PlaceholderRegion: 20 bytes
  • Const: 4 bytes
  • PlaceholderConst: 28 bytes