Enum rustc::hir::TyKind [−][src]
pub enum TyKind {
Slice(P<Ty>),
Array(P<Ty>, AnonConst),
Ptr(MutTy),
Rptr(Lifetime, MutTy),
BareFn(P<BareFnTy>),
Never,
Tup(HirVec<Ty>),
Path(QPath),
TraitObject(HirVec<PolyTraitRef>, Lifetime),
Typeof(AnonConst),
Infer,
Err,
}🔬 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 different kinds of types recognized by the compiler
Variants
Slice(P<Ty>)🔬 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 variable length slice ([T])
Array(P<Ty>, AnonConst)🔬 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 fixed length array ([T; n])
Ptr(MutTy)🔬 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 (*const T or *mut T)
Rptr(Lifetime, MutTy)🔬 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 T or &'a mut T)
BareFn(P<BareFnTy>)🔬 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 bare function (e.g. fn(usize) -> bool)
Never🔬 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 (!)
Tup(HirVec<Ty>)🔬 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 ((A, B, C, D,...))
Path(QPath)🔬 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 path to a type definition (module::module::...::Type), or an
associated type, e.g. <Vec<T> as Trait>::Type or <T>::Target.
Type parameters may be stored in each PathSegment.
TraitObject(HirVec<PolyTraitRef>, Lifetime)🔬 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 object type Bound1 + Bound2 + Bound3
where Bound is a trait or a lifetime.
Typeof(AnonConst)🔬 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?
Unused for now
Infer🔬 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?
TyKind::Infer means the type should be inferred instead of it having been specified. This can appear anywhere in a type.
Err🔬 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?
Placeholder for a type that has failed to be defined.
Trait Implementations
impl Clone for TyKind[src]
impl Clone for TyKindfn clone(&self) -> TyKind[src]
fn clone(&self) -> TyKindReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Encodable for TyKind[src]
impl Encodable for TyKindfn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>🔬 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 Decodable for TyKind[src]
impl Decodable for TyKindfn decode<__D: Decoder>(d: &mut __D) -> Result<TyKind, __D::Error>[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<TyKind, __D::Error>🔬 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 Debug for TyKind[src]
impl Debug for TyKindfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TyKind[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for TyKindfn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)🔬 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?