Struct rustc::infer::region_constraints::RegionConstraintCollector
[−]
[src]
pub struct RegionConstraintCollector<'tcx> { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'tcx> RegionConstraintCollector<'tcx>
[src]
pub fn new() -> RegionConstraintCollector<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn var_origins(&self) -> &VarOrigins
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn into_origins_and_data(self) -> (VarOrigins, RegionConstraintData<'tcx>)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Once all the constraints have been gathered, extract out the final data.
Not legal during a snapshot.
pub fn take_and_reset_data(&mut self) -> RegionConstraintData<'tcx>
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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 start_snapshot(&mut self) -> RegionSnapshot
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn commit(&mut self, snapshot: RegionSnapshot)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn rollback_to(&mut self, snapshot: RegionSnapshot)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn new_region_var(&mut self, origin: RegionVariableOrigin) -> RegionVid
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn var_origin(&self, vid: RegionVid) -> RegionVariableOrigin
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Returns the origin for the given variable.
pub fn push_skolemized(
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
br: BoundRegion,
snapshot: &RegionSnapshot
) -> Region<'tcx>
[src]
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
br: BoundRegion,
snapshot: &RegionSnapshot
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Creates a new skolemized region. Skolemized regions are fresh regions used when performing higher-ranked computations. They must be used in a very particular way and are never supposed to "escape" out into error messages or the code at large.
The idea is to always create a snapshot. Skolemized regions
can be created in the context of this snapshot, but before the
snapshot is committed or rolled back, they must be popped
(using pop_skolemized_regions
), so that their numbers can be
recycled. Normally you don't have to think about this: you use
the APIs in higher_ranked/mod.rs
, such as
skolemize_late_bound_regions
and plug_leaks
, which will
guide you on this path (ensure that the SkolemizationMap
is
consumed and you are good). There are also somewhat extensive
comments in higher_ranked/README.md
.
The snapshot
argument to this function is not really used;
it's just there to make it explicit which snapshot bounds the
skolemized region that results. It should always be the top-most snapshot.
pub fn pop_skolemized(
&mut self,
_tcx: TyCtxt<'_, '_, 'tcx>,
skols: &FxHashSet<Region<'tcx>>,
snapshot: &RegionSnapshot
)
[src]
&mut self,
_tcx: TyCtxt<'_, '_, 'tcx>,
skols: &FxHashSet<Region<'tcx>>,
snapshot: &RegionSnapshot
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Removes all the edges to/from the skolemized regions that are
in skols
. This is used after a higher-ranked operation
completes to remove all trace of the skolemized regions
created in that time.
pub fn new_bound(
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
debruijn: DebruijnIndex
) -> Region<'tcx>
[src]
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
debruijn: DebruijnIndex
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn add_given(&mut self, sub: Region<'tcx>, sup: RegionVid)
[src]
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn make_eqregion(
&mut self,
origin: SubregionOrigin<'tcx>,
sub: Region<'tcx>,
sup: Region<'tcx>
)
[src]
&mut self,
origin: SubregionOrigin<'tcx>,
sub: Region<'tcx>,
sup: Region<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn make_subregion(
&mut self,
origin: SubregionOrigin<'tcx>,
sub: Region<'tcx>,
sup: Region<'tcx>
)
[src]
&mut self,
origin: SubregionOrigin<'tcx>,
sub: Region<'tcx>,
sup: Region<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn verify_generic_bound(
&mut self,
origin: SubregionOrigin<'tcx>,
kind: GenericKind<'tcx>,
sub: Region<'tcx>,
bound: VerifyBound<'tcx>
)
[src]
&mut self,
origin: SubregionOrigin<'tcx>,
kind: GenericKind<'tcx>,
sub: Region<'tcx>,
bound: VerifyBound<'tcx>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
See Verify::VerifyGenericBound
pub fn lub_regions(
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
origin: SubregionOrigin<'tcx>,
a: Region<'tcx>,
b: Region<'tcx>
) -> Region<'tcx>
[src]
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
origin: SubregionOrigin<'tcx>,
a: Region<'tcx>,
b: Region<'tcx>
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn glb_regions(
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
origin: SubregionOrigin<'tcx>,
a: Region<'tcx>,
b: Region<'tcx>
) -> Region<'tcx>
[src]
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
origin: SubregionOrigin<'tcx>,
a: Region<'tcx>,
b: Region<'tcx>
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn opportunistic_resolve_var(
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
rid: RegionVid
) -> Region<'tcx>
[src]
&mut self,
tcx: TyCtxt<'_, '_, 'tcx>,
rid: RegionVid
) -> Region<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn vars_created_since_snapshot(
&self,
mark: &RegionSnapshot
) -> Vec<RegionVid>
[src]
&self,
mark: &RegionSnapshot
) -> Vec<RegionVid>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn tainted(
&self,
tcx: TyCtxt<'_, '_, 'tcx>,
mark: &RegionSnapshot,
r0: Region<'tcx>,
directions: TaintDirections
) -> FxHashSet<Region<'tcx>>
[src]
&self,
tcx: TyCtxt<'_, '_, 'tcx>,
mark: &RegionSnapshot,
r0: Region<'tcx>,
directions: TaintDirections
) -> FxHashSet<Region<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Computes all regions that have been related to r0
since the
mark mark
was made---r0
itself will be the first
entry. The directions
parameter controls what kind of
relations are considered. For example, one can say that only
"incoming" edges to r0
are desired, in which case one will
get the set of regions {r|r <= r0}
. This is used when
checking whether skolemized regions are being improperly
related to other regions.