Type Alias rustc_borrowck::constraints::graph::ReverseConstraintGraph
source · pub(crate) type ReverseConstraintGraph = ConstraintGraph<Reverse>;
Aliased Type§
struct ReverseConstraintGraph {
_direction: Reverse,
first_constraints: IndexVec<RegionVid, Option<OutlivesConstraintIndex>>,
next_constraints: IndexVec<OutlivesConstraintIndex, Option<OutlivesConstraintIndex>>,
}
Fields§
§_direction: Reverse
§first_constraints: IndexVec<RegionVid, Option<OutlivesConstraintIndex>>
§next_constraints: IndexVec<OutlivesConstraintIndex, Option<OutlivesConstraintIndex>>
Implementations§
source§impl<D: ConstraintGraphDirection> ConstraintGraph<D>
impl<D: ConstraintGraphDirection> ConstraintGraph<D>
sourcepub(crate) fn new(
direction: D,
set: &OutlivesConstraintSet<'_>,
num_region_vars: usize
) -> Self
pub(crate) fn new( direction: D, set: &OutlivesConstraintSet<'_>, num_region_vars: usize ) -> Self
Creates a “dependency graph” where each region constraint R1: R2
is treated as an edge R1 -> R2
. We use this graph to
construct SCCs for region inference but also for error
reporting.
sourcepub(crate) fn region_graph<'rg, 'tcx>(
&'rg self,
set: &'rg OutlivesConstraintSet<'tcx>,
static_region: RegionVid
) -> RegionGraph<'rg, 'tcx, D>
pub(crate) fn region_graph<'rg, 'tcx>( &'rg self, set: &'rg OutlivesConstraintSet<'tcx>, static_region: RegionVid ) -> RegionGraph<'rg, 'tcx, D>
Given the constraint set from which this graph was built creates a region graph so that you can iterate over regions and not constraints.
sourcepub(crate) fn outgoing_edges<'a, 'tcx>(
&'a self,
region_sup: RegionVid,
constraints: &'a OutlivesConstraintSet<'tcx>,
static_region: RegionVid
) -> Edges<'a, 'tcx, D> ⓘ
pub(crate) fn outgoing_edges<'a, 'tcx>( &'a self, region_sup: RegionVid, constraints: &'a OutlivesConstraintSet<'tcx>, static_region: RegionVid ) -> Edges<'a, 'tcx, D> ⓘ
Given a region R
, iterate over all constraints R: R1
.
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes