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(Ty<'tcx>),
ty_str,
ty_vec(Ty<'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<Ty<'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_param s.
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>
impl<'tcx> Hash for sty<'tcx>
impl<'tcx> Eq for sty<'tcx>
impl<'tcx> Clone for sty<'tcx>