Struct rustc::middle::ty_fold::RegionFolder[src]

pub struct RegionFolder<'a> {
    // some fields omitted
}

Folds over the substructure of a type, visiting its component types and all regions that occur free within it.

That is, ty::t can contain function or method types that bind regions at the call site (ReLateBound), and occurrences of regions (aka "lifetimes") that are bound within a type are not visited by this folder; only regions that occur free will be visited by fld_r.

(The distinction between "free" and "bound" is represented by keeping track of each FnSig in the lexical context of the current position of the fold.)

Methods

impl<'a> RegionFolder<'a>

fn general(tcx: &'a ctxt, fld_r: |Region|: 'a -> Region, fld_t: |t|: 'a -> t) -> RegionFolder<'a>

fn regions(tcx: &'a ctxt, fld_r: |Region|: 'a -> Region) -> RegionFolder<'a>

Trait Implementations

impl<'a> TypeFolder for RegionFolder<'a>

fn tcx<'a>(&'a self) -> &'a ctxt

fn fold_ty(&mut self, ty: t) -> t

fn fold_region(&mut self, r: Region) -> Region

fn fold_mt(&mut self, t: &mt) -> mt

fn fold_trait_ref(&mut self, t: &TraitRef) -> TraitRef

fn fold_sty(&mut self, sty: &sty) -> sty

fn fold_substs(&mut self, substs: &Substs) -> Substs

fn fold_sig(&mut self, sig: &FnSig) -> FnSig

fn fold_bare_fn_ty(&mut self, fty: &BareFnTy) -> BareFnTy

fn fold_closure_ty(&mut self, fty: &ClosureTy) -> ClosureTy

fn fold_trait_store(&mut self, s: TraitStore) -> TraitStore

fn fold_autoref(&mut self, ar: &AutoRef) -> AutoRef

fn fold_item_substs(&mut self, i: ItemSubsts) -> ItemSubsts