Struct rustc_trans::middle::ty::TySUnstable [-] [+] [src]

pub struct TyS<'tcx> {
    pub sty: sty<'tcx>,
    pub flags: TypeFlags,
    // some fields omitted
}

Fields

sty
flags

Methods

impl<'tcx> TyS<'tcx>

fn walk(&'tcx self) -> TypeWalker<'tcx>

Iterator that walks self and any types reachable from self, in depth-first order. Note that just walks the types that appear in self, it does not descend into the fields of structs or variants. For example:

isize => { isize }
Foo<Bar<isize>> => { Foo<Bar<isize>>, Bar<isize>, isize }
[isize] => { [isize], isize }

fn walk_shallow(&'tcx self) -> IntoIter<&'tcx TyS<'tcx>>

Iterator that walks the immediate children of self. Hence Foo<Bar<i32>, u32> yields the sequence [Bar<i32>, u32] (but not i32, like walk).

fn as_opt_param_ty(&self) -> Option<ParamTy>

fn is_param(&self, space: ParamSpace, index: u32) -> bool

Trait Implementations

impl<'tcx> Resolvable<'tcx> for &'tcx TyS<'tcx>

fn resolve(&self, infcx: &InferCtxt<'a, 'tcx>) -> &'tcx TyS<'tcx>

fn contains_error(&self) -> bool

impl<'tcx> PartialEq<TyS<'tcx>> for TyS<'tcx>

fn eq(&self, other: &TyS<'tcx>) -> bool

fn ne(&self, other: &Rhs) -> bool

impl<'tcx> Eq for TyS<'tcx>

impl<'tcx> Hash for TyS<'tcx>

fn hash<H>(&self, s: &mut H) where H: Hasher

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

impl<'tcx> RegionEscape for &'tcx TyS<'tcx>

fn has_regions_escaping_depth(&self, depth: u32) -> bool

fn has_escaping_regions(&self) -> bool

impl<'tcx> HasProjectionTypes for &'tcx TyS<'tcx>

fn has_projection_types(&self) -> bool

impl<'tcx> ReferencesError for &'tcx TyS<'tcx>

fn references_error(&self) -> bool

impl<'tcx> TypeFoldable<'tcx> for &'tcx TyS<'tcx>

fn fold_with<F>(&self, folder: &mut F) -> &'tcx TyS<'tcx> where F: TypeFolder<'tcx>

impl<'a, 'tcx> Relate<'a, 'tcx> for &'tcx TyS<'tcx> where 'tcx: 'a

fn relate<R>(relation: &mut R, a: &&'tcx TyS<'tcx>, b: &&'tcx TyS<'tcx>) -> Result<&'tcx TyS<'tcx>, type_err<'tcx>> where R: TypeRelation<'a, 'tcx>

impl<'tcx> Repr<'tcx> for TyS<'tcx>

fn repr(&self, tcx: &ctxt<'tcx>) -> String

impl<'tcx> UserString<'tcx> for &'tcx TyS<'tcx>

fn user_string(&self, tcx: &ctxt<'tcx>) -> String

Derived Implementations

impl<'tcx> Debug for TyS<'tcx>

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