Trait rustc_mir::borrow_check::nll::region_infer::ClosureRegionRequirementsExt[][src]

pub trait ClosureRegionRequirementsExt<'gcx, 'tcx> {
    fn apply_requirements(
        &self,
        tcx: TyCtxt<'_, 'gcx, 'tcx>,
        location: Location,
        closure_def_id: DefId,
        closure_substs: ClosureSubsts<'tcx>
    ) -> Vec<QueryRegionConstraint<'tcx>>;
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?

Required Methods

Important traits for Vec<u8>

🔬 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?

Implementations on Foreign Types

impl<'gcx, 'tcx> ClosureRegionRequirementsExt<'gcx, 'tcx> for ClosureRegionRequirements<'gcx>
[src]

Important traits for Vec<u8>

🔬 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.

🔬 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