Struct rustc_mir::borrow_check::constraints::OutlivesConstraintSet [−][src]
pub(crate) struct OutlivesConstraintSet {
outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint>,
}Expand description
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]
impl OutlivesConstraintSet[src]pub(crate) fn push(&mut self, constraint: OutlivesConstraint)[src]
pub(crate) fn graph(&self, num_region_vars: usize) -> ConstraintGraph<Normal>[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]
pub(crate) fn reverse_graph(
&self,
num_region_vars: usize
) -> ConstraintGraph<Reverse>[src]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]
pub(crate) fn compute_sccs(
&self,
constraint_graph: &ConstraintGraph<Normal>,
static_region: RegionVid
) -> Sccs<RegionVid, ConstraintSccIndex>[src]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]
impl Clone for OutlivesConstraintSet[src]fn clone(&self) -> OutlivesConstraintSet[src]
fn clone(&self) -> OutlivesConstraintSet[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Default for OutlivesConstraintSet[src]
impl Default for OutlivesConstraintSet[src]fn default() -> OutlivesConstraintSet[src]
fn default() -> OutlivesConstraintSet[src]Returns the “default value” for a type. Read more
impl Index<OutlivesConstraintIndex> for OutlivesConstraintSet[src]
impl Index<OutlivesConstraintIndex> for OutlivesConstraintSet[src]type Output = OutlivesConstraint
type Output = OutlivesConstraintThe returned type after indexing.
fn index(&self, i: OutlivesConstraintIndex) -> &Self::Output[src]
fn index(&self, i: OutlivesConstraintIndex) -> &Self::Output[src]Performs the indexing (container[index]) operation. Read more
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]