Enum rustc::ty::TypeVariants [] [src]

pub enum TypeVariants<'tcx> {
    TyBool,
    TyChar,
    TyInt(IntTy),
    TyUint(UintTy),
    TyFloat(FloatTy),
    TyAdt(&'tcx AdtDef, &'tcx Substs<'tcx>),
    TyForeign(DefId),
    TyStr,
    TyArray(Ty<'tcx>, &'tcx Const<'tcx>),
    TySlice(Ty<'tcx>),
    TyRawPtr(TypeAndMut<'tcx>),
    TyRef(Region<'tcx>, TypeAndMut<'tcx>),
    TyFnDef(DefId, &'tcx Substs<'tcx>),
    TyFnPtr(PolyFnSig<'tcx>),
    TyDynamic(Binder<&'tcx Slice<ExistentialPredicate<'tcx>>>, Region<'tcx>),
    TyClosure(DefIdClosureSubsts<'tcx>),
    TyGenerator(DefIdClosureSubsts<'tcx>, GeneratorInterior<'tcx>),
    TyNever,
    TyTuple(&'tcx Slice<Ty<'tcx>>, bool),
    TyProjection(ProjectionTy<'tcx>),
    TyAnon(DefId, &'tcx Substs<'tcx>),
    TyParam(ParamTy),
    TyInfer(InferTy),
    TyError,
}
🔬 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?

NB: If you change this, you'll probably want to change the corresponding AST structure in libsyntax/ast.rs as well.

Variants

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

The primitive boolean type. Written as bool.

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

The primitive character type; holds a Unicode scalar value (a non-surrogate code point). Written as char.

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

A primitive signed integer type. For example, i32.

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

A primitive unsigned integer type. For example, u32.

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

A primitive floating-point type. For example, f64.

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

Structures, enumerations and unions.

Substs here, possibly against intuition, may contain TyParams. That is, even after substitution it is possible that there are type variables. This happens when the TyAdt corresponds to an ADT definition and not a concrete use of it.

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

The pointee of a string slice. Written as str.

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

An array with the given length. Written as [T; n].

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

The pointee of an array slice. Written as [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?

A raw pointer. Written as *mut T or *const 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?

A reference; a pointer with an associated lifetime. Written as &'a mut T or &'a 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?

The anonymous type of a function declaration/definition. Each function has a unique type.

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

A pointer to a function. Written as fn() -> i32.

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

A trait, defined with trait.

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

The anonymous type of a closure. Used to represent the type of |a| a.

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

The anonymous type of a generator. Used to represent the type of |a| yield a.

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

The never type !

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

A tuple type. For example, (i32, bool). The bool indicates whether this is a unit tuple and was created by defaulting a diverging type variable with feature(never_type) disabled. It's only purpose is for raising future-compatibility warnings for when diverging type variables start defaulting to ! instead of ().

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

The projection of an associated type. For example, <T as Trait<..>>::N.

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

Anonymized (impl Trait) type found in a return type. The DefId comes from the impl Trait ast::Ty node, and the substitutions are for the generics of the function in question. After typeck, the concrete type can be found in the types map.

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

A type parameter; for example, T in `fn f(x: 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?

A type variable used during type-checking.

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

A placeholder for a type which could not be computed; this is propagated to avoid useless error messages.

Trait Implementations

impl<'gcx> HashStable<StableHashingContext<'gcx>> for TypeVariants<'gcx>
[src]

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

impl<'tcx> Clone for TypeVariants<'tcx>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'tcx> PartialEq for TypeVariants<'tcx>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<'tcx> Eq for TypeVariants<'tcx>
[src]

impl<'tcx> Hash for TypeVariants<'tcx>
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl<'tcx> Debug for TypeVariants<'tcx>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'tcx> Encodable for TypeVariants<'tcx>
[src]

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

impl<'tcx> Decodable for TypeVariants<'tcx>
[src]

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

impl<'tcx> Print for TypeVariants<'tcx>
[src]

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

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

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

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

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

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

impl<'tcx> Display for TypeVariants<'tcx>
[src]

[src]

Formats the value using the given formatter. Read more