Struct rustc::ty::fold::RegionFolder [−][src]
pub struct RegionFolder<'a, 'gcx: 'a + 'tcx, 'tcx: 'a> { tcx: TyCtxt<'a, 'gcx, 'tcx>, skipped_regions: &'a mut bool, current_index: DebruijnIndex, fold_region_fn: &'a mut (FnMut(Region<'tcx>, DebruijnIndex) -> Region<'tcx> + 'a), }
🔬 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?
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
.
Fields
tcx: TyCtxt<'a, 'gcx, '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?
skipped_regions: &'a mut bool
🔬 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?
current_index: DebruijnIndex
🔬 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?
Stores the index of a binder just outside the stuff we have
visited. So this begins as INNERMOST; when we pass through a
binder, it is incremented (via shift_in
).
fold_region_fn: &'a mut (FnMut(Region<'tcx>, DebruijnIndex) -> Region<'tcx> + 'a)
🔬 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?
Callback invokes for each free region. The DebruijnIndex
points to the binder just outside the ones we have passed
through.
Methods
impl<'a, 'gcx, 'tcx> RegionFolder<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> RegionFolder<'a, 'gcx, 'tcx>
pub fn new(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
skipped_regions: &'a mut bool,
fold_region_fn: &'a mut FnMut(Region<'tcx>, DebruijnIndex) -> Region<'tcx>
) -> RegionFolder<'a, 'gcx, 'tcx>
[src]
pub fn new(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
skipped_regions: &'a mut bool,
fold_region_fn: &'a mut FnMut(Region<'tcx>, DebruijnIndex) -> Region<'tcx>
) -> RegionFolder<'a, 'gcx, '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?
Trait Implementations
impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for RegionFolder<'a, 'gcx, 'tcx>
[src]
impl<'a, 'gcx, 'tcx> TypeFolder<'gcx, 'tcx> for RegionFolder<'a, 'gcx, 'tcx>
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, 'tcx>
[src]
fn tcx<'b>(&'b self) -> TyCtxt<'b, 'gcx, '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?
fn fold_binder<T: TypeFoldable<'tcx>>(&mut self, t: &Binder<T>) -> Binder<T>
[src]
fn fold_binder<T: TypeFoldable<'tcx>>(&mut self, t: &Binder<T>) -> Binder<T>
🔬 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?
fn fold_region(&mut self, r: Region<'tcx>) -> Region<'tcx>
[src]
fn fold_region(&mut self, r: Region<'tcx>) -> Region<'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?
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'tcx>
[src]
fn fold_ty(&mut self, t: Ty<'tcx>) -> Ty<'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?
fn fold_const(&mut self, c: &'tcx Const<'tcx>) -> &'tcx Const<'tcx>
[src]
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?
Auto Trait Implementations
impl<'a, 'gcx, 'tcx> !Send for RegionFolder<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Send for RegionFolder<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for RegionFolder<'a, 'gcx, 'tcx>
impl<'a, 'gcx, 'tcx> !Sync for RegionFolder<'a, 'gcx, 'tcx>