[−][src]Trait rustc_middle::ty::fold::TypeFolder
The TypeFolder trait defines the actual folding. There is a
method defined for every foldable type. Each of these has a
default implementation that does an "identity" fold. Within each
identity fold, it should invoke foo.fold_with(self) to fold each
sub-item.
Required methods
Loading content...Provided methods
pub fn fold_binder<T>(&mut self, t: Binder<T>) -> Binder<T> where
T: TypeFoldable<'tcx>, [src]
T: TypeFoldable<'tcx>,
pub fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>[src]
pub fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>[src]
pub fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>[src]
Implementors
impl<'a, 'tcx> TypeFolder<'tcx> for BoundVarReplacer<'a, 'tcx>[src]
pub fn tcx<'b>(&'b self) -> TyCtxt<'tcx>[src]
pub fn fold_binder<T: TypeFoldable<'tcx>>(&mut self, t: Binder<T>) -> Binder<T>[src]
pub fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>[src]
pub fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>[src]
pub fn fold_const(&mut self, ct: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>[src]
impl<'a, 'tcx> TypeFolder<'tcx> for RegionFolder<'a, 'tcx>[src]
pub fn tcx<'b>(&'b self) -> TyCtxt<'tcx>[src]
pub fn fold_binder<T: TypeFoldable<'tcx>>(&mut self, t: Binder<T>) -> Binder<T>[src]
pub fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>[src]
impl<'a, 'tcx> TypeFolder<'tcx> for SubstFolder<'a, 'tcx>[src]
pub fn tcx<'b>(&'b self) -> TyCtxt<'tcx>[src]
pub fn fold_binder<T: TypeFoldable<'tcx>>(&mut self, t: Binder<T>) -> Binder<T>[src]
pub fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>[src]
pub fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>[src]
pub fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>[src]
impl<'tcx> TypeFolder<'tcx> for RegionEraserVisitor<'tcx>[src]
pub fn tcx<'b>(&'b self) -> TyCtxt<'tcx>[src]
pub fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx>[src]
pub fn fold_binder<T>(&mut self, t: Binder<T>) -> Binder<T> where
T: TypeFoldable<'tcx>, [src]
T: TypeFoldable<'tcx>,
pub fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>[src]
impl<'tcx> TypeFolder<'tcx> for Shifter<'tcx>[src]
pub fn tcx<'b>(&'b self) -> TyCtxt<'tcx>[src]
pub fn fold_binder<T: TypeFoldable<'tcx>>(&mut self, t: Binder<T>) -> Binder<T>[src]
pub fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>[src]
pub fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx>[src]
pub fn fold_const(&mut self, ct: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>[src]
impl<'tcx> TypeFolder<'tcx> for NormalizeAfterErasingRegionsFolder<'tcx>[src]
pub fn tcx(&self) -> TyCtxt<'tcx>[src]
pub fn fold_ty(&mut self, ty: Ty<'tcx>) -> Ty<'tcx>[src]
pub fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>[src]
impl<'tcx> TypeFolder<'tcx> for OpaqueTypeExpander<'tcx>[src]
impl<'tcx, F, G, H> TypeFolder<'tcx> for BottomUpFolder<'tcx, F, G, H> where
F: FnMut(Ty<'tcx>) -> Ty<'tcx>,
G: FnMut(Region<'tcx>) -> Region<'tcx>,
H: FnMut(&'tcx Const<'tcx>) -> &'tcx Const<'tcx>, [src]
F: FnMut(Ty<'tcx>) -> Ty<'tcx>,
G: FnMut(Region<'tcx>) -> Region<'tcx>,
H: FnMut(&'tcx Const<'tcx>) -> &'tcx Const<'tcx>,