Enum rustc_typeck::middle::ty::styUnstable [-] [+] [src]

pub enum sty<'tcx> {
    ty_bool,
    ty_char,
    ty_int(IntTy),
    ty_uint(UintTy),
    ty_float(FloatTy),
    ty_enum(DefId, &'tcx Substs<'tcx>),
    ty_uniq(&'tcx TyS<'tcx>),
    ty_str,
    ty_vec(&'tcx TyS<'tcx>, Option<usize>),
    ty_ptr(mt<'tcx>),
    ty_rptr(&'tcx Region, mt<'tcx>),
    ty_bare_fn(Option<DefId>, &'tcx BareFnTy<'tcx>),
    ty_trait(Box<TyTrait<'tcx>>),
    ty_struct(DefId, &'tcx Substs<'tcx>),
    ty_closure(DefId, &'tcx Substs<'tcx>),
    ty_tup(Vec<&'tcx TyS<'tcx>>),
    ty_projection(ProjectionTy<'tcx>),
    ty_param(ParamTy),
    ty_infer(InferTy),
    ty_err,
}

Variants

ty_bool
ty_char
ty_int
ty_uint
ty_float
ty_enum

Substs here, possibly against intuition, may contain ty_params. That is, even after substitution it is possible that there are type variables. This happens when the ty_enum corresponds to an enum definition and not a concrete use of it. To get the correct ty_enum from the tcx, use the NodeId from the ast::Ty and look it up in the ast_ty_to_ty_cache. This is probably true for ty_struct as well.

ty_uniq
ty_str
ty_vec
ty_ptr
ty_rptr
ty_bare_fn
ty_trait
ty_struct
ty_closure
ty_tup
ty_projection
ty_param
ty_infer
ty_err

Trait Implementations

Derived Implementations

impl<'tcx> Debug for sty<'tcx>

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

impl<'tcx> Hash for sty<'tcx>

fn hash<__H>(&self, __arg_0: &mut __H) where __H: Hasher

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl<'tcx> Eq for sty<'tcx>

impl<'tcx> PartialEq<sty<'tcx>> for sty<'tcx>

fn eq(&self, __arg_0: &sty<'tcx>) -> bool

fn ne(&self, __arg_0: &sty<'tcx>) -> bool

impl<'tcx> Clone for sty<'tcx>

fn clone(&self) -> sty<'tcx>

fn clone_from(&mut self, source: &Self)