Struct rustc::middle::ty_walk::TypeWalkerUnstable [-]  [+] [src]

pub struct TypeWalker<'tcx> {
    // some fields omitted
}

Methods

impl<'tcx> TypeWalker<'tcx>

fn new(ty: Ty<'tcx>) -> TypeWalker<'tcx>

fn skip_current_subtree(&mut self)

Skips the subtree of types corresponding to the last type returned by next().

Example: Imagine you are walking Foo<Bar<int>, uint>.

let mut iter: TypeWalker = ...;
iter.next(); // yields Foo
iter.next(); // yields Bar<int>
iter.skip_current_subtree(); // skips int
iter.next(); // yields uint

Trait Implementations

impl<'tcx> Iterator for TypeWalker<'tcx>

type Item = Ty<'tcx>

fn next(&mut self) -> Option<Ty<'tcx>>

fn size_hint(&self) -> (usize, Option<usize>)