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
).