pub(crate) fn new(
        var_infos: VarInfos,
        universal_regions: Rc<UniversalRegions<'tcx>>,
        placeholder_indices: Rc<PlaceholderIndices>,
        universal_region_relations: Rc<UniversalRegionRelations<'tcx>>,
        outlives_constraints: OutlivesConstraintSet,
        member_constraints_in: MemberConstraintSet<'tcx, RegionVid>,
        closure_bounds_mapping: FxHashMap<
            Location,
            FxHashMap<(RegionVid, RegionVid), (ConstraintCategory, Span)>,
        >,
        type_tests: Vec<TypeTest<'tcx>>,
        liveness_constraints: LivenessValues<RegionVid>,
        elements: &Rc<RegionValueElements>,
    ) -> Self {
        // Create a RegionDefinition for each inference variable.
        let definitions: IndexVec<_, _> = var_infos
            .into_iter()
            .map(|info| RegionDefinition::new(info.universe, info.origin))
            .collect();

        let constraints = Rc::new(outlives_constraints); // freeze constraints
        let constraint_graph = Rc::new(constraints.graph(definitions.len()));
        let fr_static = universal_regions.fr_static;
        let constraint_sccs = Rc::new(constraints.compute_sccs(&constraint_graph, fr_static));

        let mut scc_values =
            RegionValues::new(elements, universal_regions.len(), &placeholder_indices);

        for region in liveness_constraints.rows() {
            let scc = constraint_sccs.scc(region);
            scc_values.merge_liveness(scc, region, &liveness_constraints);
        }

        let scc_universes = Self::compute_scc_universes(&constraint_sccs, &definitions);

        let scc_representatives = Self::compute_scc_representatives(&constraint_sccs, &definitions);

        let member_constraints =
            Rc::new(member_constraints_in.into_mapped(|r| constraint_sccs.scc(r)));

        let mut result = Self {
            definitions,
            liveness_constraints,
            constraints,
            constraint_graph,
            constraint_sccs,
            rev_constraint_graph: None,
            member_constraints,
            member_constraints_applied: Vec::new(),
            closure_bounds_mapping,
            scc_universes,
            scc_representatives,
            scc_values,
            type_tests,
            universal_regions,
            universal_region_relations,
        };

        result.init_free_and_bound_regions();

        result
    }
/// Creates a new region inference context with a total of
/// `num_region_variables` valid inference variables; the first N
/// of those will be constant regions representing the free
/// regions defined in `universal_regions`.
///
/// The `outlives_constraints` and `type_tests` are an initial set
/// of constraints produced by the MIR type check.
Creates a new region inference context with a total of
`num_region_variables` valid inference variables; the first N
of those will be constant regions representing the free
regions defined in `universal_regions`.

The `outlives_constraints` and `type_tests` are an initial set
of constraints produced by the MIR type check.
Creates a new region inference context with a total of ` num_region_variables ` valid inference variables ; the first N of those will be constant regions representing the free regions defined in ` universal_regions ` . The ` outlives_constraints ` and ` type_tests ` are an initial set of constraints produced by the MIR type check .
pub(crate) fn new(
        var_infos: VarInfos,
        universal_regions: Rc<UniversalRegions<'tcx>>,
        placeholder_indices: Rc<PlaceholderIndices>,
        universal_region_relations: Rc<UniversalRegionRelations<'tcx>>,
        outlives_constraints: OutlivesConstraintSet,
        member_constraints_in: MemberConstraintSet<'tcx, RegionVid>,
        closure_bounds_mapping: FxHashMap<
            Location,
            FxHashMap<(RegionVid, RegionVid), (ConstraintCategory, Span)>,
        >,
        type_tests: Vec<TypeTest<'tcx>>,
        liveness_constraints: LivenessValues<RegionVid>,
        elements: &Rc<RegionValueElements>,
    ) -> Self {
        // Create a RegionDefinition for each inference variable.
        let definitions: IndexVec<_, _> = var_infos
            .into_iter()
            .map(|info| RegionDefinition::new(info.universe, info.origin))
            .collect();
        let constraints = Rc::new(outlives_constraints); // freeze constraints
        let constraint_graph = Rc::new(constraints.graph(definitions.len()));
        let fr_static = universal_regions.fr_static;
        let constraint_sccs = Rc::new(constraints.compute_sccs(&constraint_graph, fr_static));
        let mut scc_values =
            RegionValues::new(elements, universal_regions.len(), &placeholder_indices);
        for region in liveness_constraints.rows() {
            let scc = constraint_sccs.scc(region);
            scc_values.merge_liveness(scc, region, &liveness_constraints);
        }
        let scc_universes = Self::compute_scc_universes(&constraint_sccs, &definitions);
        let scc_representatives = Self::compute_scc_representatives(&constraint_sccs, &definitions);
        let member_constraints =
            Rc::new(member_constraints_in.into_mapped(|r| constraint_sccs.scc(r)));
        let mut result = Self {
            definitions,
            liveness_constraints,
            constraints,
            constraint_graph,
            constraint_sccs,
            rev_constraint_graph: None,
            member_constraints,
            member_constraints_applied: Vec::new(),
            closure_bounds_mapping,
            scc_universes,
            scc_representatives,
            scc_values,
            type_tests,
            universal_regions,
            universal_region_relations,
        };
        result.init_free_and_bound_regions();
        result
    }
pub ( crate ) fn new ( var_infos : VarInfos , universal_regions : Rc < UniversalRegions < ' tcx > > , placeholder_indices : Rc < PlaceholderIndices > , universal_region_relations : Rc < UniversalRegionRelations < ' tcx > > , outlives_constraints : OutlivesConstraintSet , member_constraints_in : MemberConstraintSet < ' tcx , RegionVid > , closure_bounds_mapping : FxHashMap < Location , FxHashMap < ( RegionVid , RegionVid ) , ( ConstraintCategory , Span ) > , > , type_tests : Vec < TypeTest < ' tcx > > , liveness_constraints : LivenessValues < RegionVid > , elements : & Rc < RegionValueElements > , ) -> Self { // Create a RegionDefinition for each inference variable. let definitions : IndexVec < _ , _ > = var_infos . into_iter ( ) . map ( | info | RegionDefinition :: new ( info . universe , info . origin ) ) . collect ( ) ; let constraints = Rc :: new ( outlives_constraints ) ; // freeze constraints let constraint_graph = Rc :: new ( constraints . graph ( definitions . len ( ) ) ) ; let fr_static = universal_regions . fr_static ; let constraint_sccs = Rc :: new ( constraints . compute_sccs ( & constraint_graph , fr_static ) ) ; let mut scc_values = RegionValues :: new ( elements , universal_regions . len ( ) , & placeholder_indices ) ; for region in liveness_constraints . rows ( ) { let scc = constraint_sccs . scc ( region ) ; scc_values . merge_liveness ( scc , region , & liveness_constraints ) ; } let scc_universes = Self :: compute_scc_universes ( & constraint_sccs , & definitions ) ; let scc_representatives = Self :: compute_scc_representatives ( & constraint_sccs , & definitions ) ; let member_constraints = Rc :: new ( member_constraints_in . into_mapped ( | r | constraint_sccs . scc ( r ) ) ) ; let mut result = Self { definitions , liveness_constraints , constraints , constraint_graph , constraint_sccs , rev_constraint_graph : None , member_constraints , member_constraints_applied : Vec :: new ( ) , closure_bounds_mapping , scc_universes , scc_representatives , scc_values , type_tests , universal_regions , universal_region_relations , } ; result . init_free_and_bound_regions ( ) ; result }
Creates a new region inference context with a total of
`num_region_variables` valid inference variables; the first N
of those will be constant regions representing the free
regions defined in `universal_regions`.
Creates a new region inference context with a total of ` num_region_variables ` valid inference variables ; the first N of those will be constant regions representing the free regions defined in ` universal_regions ` .
var_infos
VarInfos
universal_regions
Rc<UniversalRegions<'tcx>>
placeholder_indices
Rc<PlaceholderIndices>
universal_region_relations
Rc<UniversalRegionRelations<'tcx>>
outlives_constraints
OutlivesConstraintSet
member_constraints_in
MemberConstraintSet<'tcx, RegionVid>
closure_bounds_mapping
FxHashMap<
            Location,
            FxHashMap<(RegionVid, RegionVid), (ConstraintCategory, Span)>,
        >
type_tests
Vec<TypeTest<'tcx>>
liveness_constraints
LivenessValues<RegionVid>
elements
&Rc<RegionValueElements>