Enum rustc_typeck::hir::Ty_
[−]
[src]
pub enum Ty_ {
TySlice(P<Ty>),
TyArray(P<Ty>, BodyId),
TyPtr(MutTy),
TyRptr(Lifetime, MutTy),
TyBareFn(P<BareFnTy>),
TyNever,
TyTup(P<[P<Ty>]>),
TyPath(QPath),
TyTraitObject(P<[PolyTraitRef]>, Lifetime),
TyImplTrait(P<[TyParamBound]>),
TyTypeof(BodyId),
TyInfer,
}rustc_private)The different kinds of types recognized by the compiler
Variants
TySlice(P<Ty>)rustc_private)A variable length slice ([T])
TyArray(P<Ty>, BodyId)rustc_private)A fixed length array ([T; n])
TyPtr(MutTy)rustc_private)A raw pointer (*const T or *mut T)
TyRptr(Lifetime, MutTy)rustc_private)A reference (&'a T or &'a mut T)
TyBareFn(P<BareFnTy>)rustc_private)A bare function (e.g. fn(usize) -> bool)
TyNeverrustc_private)The never type (!)
TyTup(P<[P<Ty>]>)rustc_private)A tuple ((A, B, C, D,...))
TyPath(QPath)rustc_private)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.
TyTraitObject(P<[PolyTraitRef]>, Lifetime)rustc_private)A trait object type Bound1 + Bound2 + Bound3
where Bound is a trait or a lifetime.
TyImplTrait(P<[TyParamBound]>)rustc_private)An impl Bound1 + Bound2 + Bound3 type
where Bound is a trait or a lifetime.
TyTypeof(BodyId)rustc_private)Unused for now
TyInferrustc_private)TyInfer means the type should be inferred instead of it having been specified. This can appear anywhere in a type.
Trait Implementations
impl Decodable for Ty_[src]
fn decode<__D>(__arg_0: &mut __D) -> Result<Ty_, __D::Error> where __D: Decoder
rustc_private)impl PartialEq<Ty_> for Ty_[src]
fn eq(&self, __arg_0: &Ty_) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Ty_) -> bool
This method tests for !=.
impl Hash for Ty_[src]
fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl Clone for Ty_[src]
fn clone(&self) -> Ty_
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Eq for Ty_[src]
impl Debug for Ty_[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter.