Trait rustc::ty::fold::TypeFolder [] [src]

pub trait TypeFolder<'gcx: 'tcx, 'tcx>: Sized {
    fn tcx<'a>(&'a self) -> TyCtxt<'a, 'gcx, 'tcx>;

    fn fold_binder<T>(&mut self, t: &Binder<T>) -> Binder<T>
    where
        T: TypeFoldable<'tcx>
, { ... }
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx> { ... }
fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx> { ... }
fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx> { ... } }
🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

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

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Provided Methods

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Implementors