pub struct RegionConstraintStorage<'db> {
pub(super) var_infos: IndexVec<RegionVid, RegionVariableInfo>,
pub(super) data: RegionConstraintData<'db>,
lubs: FxHashMap<TwoRegions<'db>, RegionVid>,
glbs: FxHashMap<TwoRegions<'db>, RegionVid>,
pub(super) unification_table: UnificationTableStorage<RegionVidKey<'db>>,
any_unifications: bool,
}Fields§
§var_infos: IndexVec<RegionVid, RegionVariableInfo>For each RegionVid, the corresponding RegionVariableOrigin.
data: RegionConstraintData<'db>§lubs: FxHashMap<TwoRegions<'db>, RegionVid>For a given pair of regions (R1, R2), maps to a region R3 that is designated as their LUB (edges R1 <= R3 and R2 <= R3 exist). This prevents us from making many such regions.
glbs: FxHashMap<TwoRegions<'db>, RegionVid>For a given pair of regions (R1, R2), maps to a region R3 that is designated as their GLB (edges R3 <= R1 and R3 <= R2 exist). This prevents us from making many such regions.
unification_table: UnificationTableStorage<RegionVidKey<'db>>When we add a R1 == R2 constraint, we currently add (a) edges
R1 <= R2 and R2 <= R1 and (b) we unify the two regions in this
table. You can then call opportunistic_resolve_var early
which will map R1 and R2 to some common region (i.e., either
R1 or R2). This is important when fulfillment, dropck and other such
code is iterating to a fixed point, because otherwise we sometimes
would wind up with a fresh stream of region variables that have been
equated but appear distinct.
any_unifications: boola flag set to true when we perform any unifications; this is used
to micro-optimize take_and_reset_data
Implementations§
Source§impl<'db> RegionConstraintStorage<'db>
impl<'db> RegionConstraintStorage<'db>
pub(crate) fn with_log<'a>( &'a mut self, undo_log: &'a mut InferCtxtUndoLogs<'db>, ) -> RegionConstraintCollector<'db, 'a>
Trait Implementations§
Source§impl<'db> Clone for RegionConstraintStorage<'db>
impl<'db> Clone for RegionConstraintStorage<'db>
Source§fn clone(&self) -> RegionConstraintStorage<'db>
fn clone(&self) -> RegionConstraintStorage<'db>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'db> Debug for RegionConstraintStorage<'db>
impl<'db> Debug for RegionConstraintStorage<'db>
Source§impl<'db> Default for RegionConstraintStorage<'db>
impl<'db> Default for RegionConstraintStorage<'db>
Source§fn default() -> RegionConstraintStorage<'db>
fn default() -> RegionConstraintStorage<'db>
Auto Trait Implementations§
impl<'db> Freeze for RegionConstraintStorage<'db>
impl<'db> RefUnwindSafe for RegionConstraintStorage<'db>
impl<'db> Send for RegionConstraintStorage<'db>
impl<'db> Sync for RegionConstraintStorage<'db>
impl<'db> Unpin for RegionConstraintStorage<'db>
impl<'db> UnsafeUnpin for RegionConstraintStorage<'db>
impl<'db> UnwindSafe for RegionConstraintStorage<'db>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ⓘ
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> ⓘ
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