Enum rustc_typeck::hir::Ty_ [] [src]

pub enum Ty_ {
    TyVec(P<Ty>),
    TyFixedLengthVec(P<Ty>, P<Expr>),
    TyPtr(MutTy),
    TyRptr(Option<Lifetime>, MutTy),
    TyBareFn(P<BareFnTy>),
    TyTup(P<[P<Ty>]>),
    TyPath(Option<QSelf>, Path),
    TyObjectSum(P<Ty>, P<[TyParamBound]>),
    TyPolyTraitRef(P<[TyParamBound]>),
    TyTypeof(P<Expr>),
    TyInfer,
}
Unstable (rustc_private)

The different kinds of types recognized by the compiler

Variants

TyVec(P<Ty>)
Unstable (rustc_private)
TyFixedLengthVec(P<Ty>, P<Expr>)
Unstable (rustc_private)

A fixed length array ([T; n])

TyPtr(MutTy)
Unstable (rustc_private)

A raw pointer (*const T or *mut T)

TyRptr(Option<Lifetime>, MutTy)
Unstable (rustc_private)

A reference (&'a T or &'a mut T)

TyBareFn(P<BareFnTy>)
Unstable (rustc_private)

A bare function (e.g. fn(usize) -> bool)

TyTup(P<[P<Ty>]>)
Unstable (rustc_private)

A tuple ((A, B, C, D,...))

TyPath(Option<QSelf>, Path)
Unstable (rustc_private)

A path (module::module::...::Type), optionally "qualified", e.g. <HirVec<T> as SomeTrait>::SomeType.

Type parameters are stored in the Path itself

TyObjectSum(P<Ty>, P<[TyParamBound]>)
Unstable (rustc_private)

Something like A+B. Note that B must always be a path.

TyPolyTraitRef(P<[TyParamBound]>)
Unstable (rustc_private)

A type like for<'a> Foo<&'a Bar>

TyTypeof(P<Expr>)
Unstable (rustc_private)

Unused for now

TyInfer
Unstable (rustc_private)

TyInfer means the type should be inferred instead of it having been specified. This can appear anywhere in a type.

Trait Implementations

Derived Implementations

impl Debug for Ty_

fn fmt(&self, __arg_0: &mut Formatter) -> Result<()Error>

Formats the value using the given formatter.

impl Hash for Ty_

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: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Decodable for Ty_

fn decode<__D>(__arg_0: &mut __D) -> Result<Ty_, __D::Error> where __D: Decoder

impl Encodable for Ty_

fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), __S::Error> where __S: Encoder

impl Eq for Ty_

impl PartialEq<Ty_> for Ty_

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 Clone for Ty_

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