Struct RegionConstraintCollector
pub struct RegionConstraintCollector<'db, 'a> { /* private fields */ }Implementations§
§impl<'db> RegionConstraintCollector<'db, '_>
impl<'db> RegionConstraintCollector<'db, '_>
pub fn num_region_vars(&self) -> usize
pub fn region_constraint_data(&self) -> &RegionConstraintData<'db>
pub fn take_and_reset_data(&mut self) -> RegionConstraintData<'db>
pub fn take_and_reset_data(&mut self) -> RegionConstraintData<'db>
Takes (and clears) the current set of constraints. Note that the set of variables remains intact, but all relationships between them are reset. This is used during NLL checking to grab the set of constraints that arose from a particular operation.
We don’t want to leak relationships between variables between
points because just because (say) r1 == r2 was true at some
point P in the graph doesn’t imply that it will be true at
some other point Q, in NLL.
Not legal during a snapshot.
pub fn data(&self) -> &RegionConstraintData<'db>
pub fn opportunistic_resolve_var(
&mut self,
cx: DbInterner<'db>,
vid: RegionVid,
) -> Region<'db>
pub fn opportunistic_resolve_var( &mut self, cx: DbInterner<'db>, vid: RegionVid, ) -> Region<'db>
Resolves a region var to its value in the unification table, if it exists.
Otherwise, it is resolved to the root ReVar in the table.
pub fn probe_value( &mut self, vid: RegionVid, ) -> Result<Region<'db>, UniverseIndex>
pub fn universe(&mut self, region: Region<'db>) -> UniverseIndex
pub fn vars_since_snapshot(&self, value_count: usize) -> Range<RegionVid>
pub fn region_constraints_added_in_snapshot(&self, mark: &Snapshot) -> bool
pub fn region_constraints_added_in_snapshot(&self, mark: &Snapshot) -> bool
See InferCtxt::region_constraints_added_in_snapshot.
Auto Trait Implementations§
impl<'db, 'a> Freeze for RegionConstraintCollector<'db, 'a>
impl<'db, 'a> RefUnwindSafe for RegionConstraintCollector<'db, 'a>
impl<'db, 'a> Send for RegionConstraintCollector<'db, 'a>
impl<'db, 'a> Sync for RegionConstraintCollector<'db, 'a>
impl<'db, 'a> Unpin for RegionConstraintCollector<'db, 'a>
impl<'db, 'a> !UnwindSafe for RegionConstraintCollector<'db, 'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more