compute_closure_requirements_modulo_opaques

Function compute_closure_requirements_modulo_opaques 

Source
pub(crate) fn compute_closure_requirements_modulo_opaques<'tcx>(
    infcx: &BorrowckInferCtxt<'tcx>,
    body: &Body<'tcx>,
    location_map: Rc<DenseLocationMap>,
    universal_region_relations: &Frozen<UniversalRegionRelations<'tcx>>,
    constraints: &MirTypeckRegionConstraints<'tcx>,
) -> Option<ClosureRegionRequirements<'tcx>>
Expand description

Computes the closure requirements given the current inference state.

This is intended to be used by before BorrowCheckRootCtxt::handle_opaque_type_uses because applying member constraints may rely on closure requirements. This is frequently the case of async functions where pretty much everything happens inside of the inner async block but the opaque only gets constrained in the parent function.