Struct rustc_infer::infer::region_constraints::leak_check::LeakCheck
source · [−]struct LeakCheck<'me, 'tcx> {
tcx: TyCtxt<'tcx>,
universe_at_start_of_snapshot: UniverseIndex,
overly_polymorphic: bool,
mini_graph: &'me MiniGraph<'tcx>,
rcc: &'me RegionConstraintCollector<'me, 'tcx>,
scc_placeholders: IndexVec<LeakCheckScc, Option<PlaceholderRegion>>,
scc_universes: IndexVec<LeakCheckScc, SccUniverse<'tcx>>,
}
Fields
tcx: TyCtxt<'tcx>
universe_at_start_of_snapshot: UniverseIndex
overly_polymorphic: bool
Only used when reporting region errors.
mini_graph: &'me MiniGraph<'tcx>
rcc: &'me RegionConstraintCollector<'me, 'tcx>
scc_placeholders: IndexVec<LeakCheckScc, Option<PlaceholderRegion>>
scc_universes: IndexVec<LeakCheckScc, SccUniverse<'tcx>>
Implementations
sourceimpl<'me, 'tcx> LeakCheck<'me, 'tcx>
impl<'me, 'tcx> LeakCheck<'me, 'tcx>
fn new(
tcx: TyCtxt<'tcx>,
universe_at_start_of_snapshot: UniverseIndex,
max_universe: UniverseIndex,
overly_polymorphic: bool,
mini_graph: &'me MiniGraph<'tcx>,
rcc: &'me RegionConstraintCollector<'me, 'tcx>
) -> Self
sourcefn assign_placeholder_values(&mut self) -> RelateResult<'tcx, ()>
fn assign_placeholder_values(&mut self) -> RelateResult<'tcx, ()>
Compute what placeholders (if any) each SCC must be equal to. Also compute the minimum universe of all the regions in each SCC.
fn assign_scc_value(
&mut self,
scc: LeakCheckScc,
placeholder: PlaceholderRegion
) -> RelateResult<'tcx, ()>
sourcefn propagate_scc_value(&mut self) -> RelateResult<'tcx, ()>
fn propagate_scc_value(&mut self) -> RelateResult<'tcx, ()>
For each SCC S, iterate over each successor S1 where S: S1
:
- Compute
Iterate over each SCC
S
and ensure that, for eachS1
whereS1: S
,universe(S) <= universe(S1)
. This executes afterassign_placeholder_values
, souniverse(S)
is already the minimum universe of any of its direct constituents.
fn placeholder_error(
&self,
placeholder1: PlaceholderRegion,
placeholder2: PlaceholderRegion
) -> TypeError<'tcx>
fn error(
&self,
placeholder: PlaceholderRegion,
other_region: Region<'tcx>
) -> TypeError<'tcx>
Auto Trait Implementations
impl<'me, 'tcx> !RefUnwindSafe for LeakCheck<'me, 'tcx>
impl<'me, 'tcx> !Send for LeakCheck<'me, 'tcx>
impl<'me, 'tcx> !Sync for LeakCheck<'me, 'tcx>
impl<'me, 'tcx> Unpin for LeakCheck<'me, 'tcx>where
'tcx: 'me,
impl<'me, 'tcx> !UnwindSafe for LeakCheck<'me, 'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
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: 80 bytes