Struct rustc::middle::ty_fold::RegionFolderUnstable [-] [+] [src]

pub struct RegionFolder<'a, 'tcx> {
    // 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 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.

Methods

impl<'a, 'tcx> RegionFolder<'a, 'tcx>

fn new<F>(tcx: &'a ctxt<'tcx>, fld_r: &'a mut F) -> RegionFolder<'a, 'tcx> where F: FnMut(Region, u32) -> Region

Trait Implementations

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

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

fn enter_region_binder(&mut self)

fn exit_region_binder(&mut self)

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

fn fold_binder<T>(&mut self, t: &Binder<T>) -> Binder<T> where T: TypeFoldable<'tcx> + Repr<'tcx> + Clone

fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>

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

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

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

fn fold_fn_sig(&mut self, sig: &FnSig<'tcx>) -> FnSig<'tcx>

fn fold_output(&mut self, output: &FnOutput<'tcx>) -> FnOutput<'tcx>

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

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

fn fold_existential_bounds(&mut self, s: &ExistentialBounds<'tcx>) -> ExistentialBounds<'tcx>

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

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