[][src]Enum rustc::ty::sty::TyKind

pub enum TyKind<'tcx> {
    Bool,
    Char,
    Int(IntTy),
    Uint(UintTy),
    Float(FloatTy),
    Adt(&'tcx AdtDefSubstsRef<'tcx>),
    Foreign(DefId),
    Str,
    Array(Ty<'tcx>, &'tcx Const<'tcx>),
    Slice(Ty<'tcx>),
    RawPtr(TypeAndMut<'tcx>),
    Ref(Region<'tcx>, Ty<'tcx>, Mutability),
    FnDef(DefIdSubstsRef<'tcx>),
    FnPtr(PolyFnSig<'tcx>),
    Dynamic(Binder<&'tcx List<ExistentialPredicate<'tcx>>>, Region<'tcx>),
    Closure(DefIdSubstsRef<'tcx>),
    Generator(DefIdSubstsRef<'tcx>, Movability),
    GeneratorWitness(Binder<&'tcx List<Ty<'tcx>>>),
    Never,
    Tuple(SubstsRef<'tcx>),
    Projection(ProjectionTy<'tcx>),
    UnnormalizedProjection(ProjectionTy<'tcx>),
    Opaque(DefIdSubstsRef<'tcx>),
    Param(ParamTy),
    Bound(DebruijnIndexBoundTy),
    Placeholder(PlaceholderType),
    Infer(InferTy),
    Error,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

N.B., if you change this, you'll probably want to change the corresponding AST structure in libsyntax/ast.rs as well.

Variants

Bool
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The primitive boolean type. Written as bool.

Char
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

Int(IntTy)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A primitive signed integer type. For example, i32.

Uint(UintTy)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A primitive unsigned integer type. For example, u32.

Float(FloatTy)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

Adt(&'tcx AdtDefSubstsRef<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Structures, enumerations and unions.

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

Foreign(DefId)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

An unsized FFI type that is opaque to Rust. Written as extern type T.

Str
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The pointee of a string slice. Written as str.

Array(Ty<'tcx>, &'tcx Const<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

Slice(Ty<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The pointee of an array slice. Written as [T].

RawPtr(TypeAndMut<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A raw pointer. Written as *mut T or *const T

Ref(Region<'tcx>, Ty<'tcx>, Mutability)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A reference; a pointer with an associated lifetime. Written as &'a mut T or &'a T.

FnDef(DefIdSubstsRef<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The anonymous type of a function declaration/definition. Each function has a unique type, which is output (for a function named foo returning an i32) as fn() -> i32 {foo}.

For example the type of bar here:

fn foo() -> i32 { 1 }
let bar = foo; // bar: fn() -> i32 {foo}
FnPtr(PolyFnSig<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

For example the type of bar here:

fn foo() -> i32 { 1 }
let bar: fn() -> i32 = foo;
Dynamic(Binder<&'tcx List<ExistentialPredicate<'tcx>>>, Region<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A trait, defined with trait.

Closure(DefIdSubstsRef<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

Generator(DefIdSubstsRef<'tcx>, Movability)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

GeneratorWitness(Binder<&'tcx List<Ty<'tcx>>>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A type representin the types stored inside a generator. This should only appear in GeneratorInteriors.

Never
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

The never type !

Tuple(SubstsRef<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A tuple type. For example, (i32, bool). Use TyS::tuple_fields to iterate over the field types.

Projection(ProjectionTy<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

UnnormalizedProjection(ProjectionTy<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A placeholder type used when we do not have enough information to normalize the projection of an associated type to an existing concrete type. Currently only used with chalk-engine.

Opaque(DefIdSubstsRef<'tcx>)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Opaque (impl Trait) type found in a return type. The DefId comes either from

Param(ParamTy)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A type parameter; for example, T in `fn f(x: T) {}

Bound(DebruijnIndexBoundTy)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Bound type variable, used only when preparing a trait query.

Placeholder(PlaceholderType)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A placeholder type - universally quantified higher-ranked type.

Infer(InferTy)
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

A type variable used during type checking.

Error
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

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

Trait Implementations

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

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

impl<'tcx> Ord for TyKind<'tcx>[src]

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

impl<'tcx> PartialOrd<TyKind<'tcx>> for TyKind<'tcx>[src]

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

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

impl<'tcx> StructuralPartialEq for TyKind<'tcx>[src]

impl<'tcx> StructuralEq for TyKind<'tcx>[src]

impl<'tcx> Borrow<TyKind<'tcx>> for Interned<'tcx, TyS<'tcx>>[src]

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

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

impl<'tcx, '__ctx> HashStable<StableHashingContext<'__ctx>> for TyKind<'tcx>[src]

Auto Trait Implementations

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

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

impl<'tcx> Unpin for TyKind<'tcx>

impl<'tcx> !UnwindSafe for TyKind<'tcx>

impl<'tcx> !RefUnwindSafe for TyKind<'tcx>

Blanket Implementations

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<T> Erased for T[src]

impl<E> SpecializationError for E[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]