[−][src]Trait rustc_mir::borrow_check::nll::region_infer::ClosureRegionRequirementsExt
🔬 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?
Required Methods
fn apply_requirements(
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
location: Location,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Vec<QueryRegionConstraint<'tcx>>
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
location: Location,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Vec<QueryRegionConstraint<'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 subst_closure_mapping<T>(
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
closure_mapping: &IndexVec<RegionVid, Region<'tcx>>,
value: &T
) -> T where
T: TypeFoldable<'tcx>,
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
closure_mapping: &IndexVec<RegionVid, Region<'tcx>>,
value: &T
) -> T where
T: TypeFoldable<'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?
Implementations on Foreign Types
impl<'gcx, 'tcx> ClosureRegionRequirementsExt<'gcx, 'tcx> for ClosureRegionRequirements<'gcx>
[src]
impl<'gcx, 'tcx> ClosureRegionRequirementsExt<'gcx, 'tcx> for ClosureRegionRequirements<'gcx>
fn apply_requirements(
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
location: Location,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Vec<QueryRegionConstraint<'tcx>>
[src]
fn apply_requirements(
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
location: Location,
closure_def_id: DefId,
closure_substs: ClosureSubsts<'tcx>
) -> Vec<QueryRegionConstraint<'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?
Given an instance T of the closure type, this method instantiates the "extra" requirements that we computed for the closure into the inference context. This has the effect of adding new outlives obligations to existing variables.
As described on ClosureRegionRequirements
, the extra
requirements are expressed in terms of regionvids that index
into the free regions that appear on the closure type. So, to
do this, we first copy those regions out from the type T into
a vector. Then we can just index into that vector to extract
out the corresponding region from T and apply the
requirements.
fn subst_closure_mapping<T>(
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
closure_mapping: &IndexVec<RegionVid, Region<'tcx>>,
value: &T
) -> T where
T: TypeFoldable<'tcx>,
[src]
fn subst_closure_mapping<T>(
&self,
tcx: TyCtxt<'_, 'gcx, 'tcx>,
closure_mapping: &IndexVec<RegionVid, Region<'tcx>>,
value: &T
) -> T where
T: TypeFoldable<'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?