Struct rustc_mir::borrow_check::constraints::OutlivesConstraintSet [−][src]
A set of NLL region constraints. These include “outlives”
constraints of the form R1: R2
. Each constraint is identified by
a unique OutlivesConstraintIndex
and you can index into the set
(constraint_set[i]
) to access the constraint details.
Fields
outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint>
Implementations
impl OutlivesConstraintSet
[src]
pub(crate) fn push(&mut self, constraint: OutlivesConstraint)
[src]
pub(crate) fn graph(&self, num_region_vars: usize) -> ConstraintGraph<Normal>
[src]
Constructs a “normal” graph from the constraint set; the graph makes it easy to find the constraints affecting a particular region.
N.B., this graph contains a “frozen” view of the current
constraints. Any new constraints added to the OutlivesConstraintSet
after the graph is built will not be present in the graph.
pub(crate) fn reverse_graph(
&self,
num_region_vars: usize
) -> ConstraintGraph<Reverse>
[src]
&self,
num_region_vars: usize
) -> ConstraintGraph<Reverse>
Like graph
, but constraints a reverse graph where R1: R2
represents an edge R2 -> R1
.
pub(crate) fn compute_sccs(
&self,
constraint_graph: &ConstraintGraph<Normal>,
static_region: RegionVid
) -> Sccs<RegionVid, ConstraintSccIndex>
[src]
&self,
constraint_graph: &ConstraintGraph<Normal>,
static_region: RegionVid
) -> Sccs<RegionVid, ConstraintSccIndex>
Computes cycles (SCCs) in the graph of regions. In particular, find all regions R1, R2 such that R1: R2 and R2: R1 and group them into an SCC, and find the relationships between SCCs.
pub(crate) fn outlives(
&self
) -> &IndexVec<OutlivesConstraintIndex, OutlivesConstraint>
[src]
&self
) -> &IndexVec<OutlivesConstraintIndex, OutlivesConstraint>
Trait Implementations
impl Clone for OutlivesConstraintSet
[src]
fn clone(&self) -> OutlivesConstraintSet
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for OutlivesConstraintSet
[src]
fn default() -> OutlivesConstraintSet
[src]
impl Index<OutlivesConstraintIndex> for OutlivesConstraintSet
[src]
type Output = OutlivesConstraint
The returned type after indexing.
fn index(&self, i: OutlivesConstraintIndex) -> &Self::Output
[src]
Auto Trait Implementations
impl RefUnwindSafe for OutlivesConstraintSet
impl !Send for OutlivesConstraintSet
impl !Sync for OutlivesConstraintSet
impl Unpin for OutlivesConstraintSet
impl UnwindSafe for OutlivesConstraintSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.