Struct rustc_mir::borrow_check::nll::region_infer::RegionInferenceContext [−][src]
pub struct RegionInferenceContext<'tcx> { definitions: IndexVec<RegionVid, RegionDefinition<'tcx>>, elements: Rc<RegionValueElements>, liveness_constraints: RegionValues, inferred_values: Option<RegionValues>, dependency_map: Option<IndexVec<RegionVid, Option<ConstraintIndex>>>, constraints: IndexVec<ConstraintIndex, OutlivesConstraint>, type_tests: Vec<TypeTest<'tcx>>, universal_regions: UniversalRegions<'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?
Fields
definitions: IndexVec<RegionVid, RegionDefinition<'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?
Contains the definition for every region variable. Region
variables are identified by their index (RegionVid
). The
definition contains information about where the region came
from as well as its final inferred value.
elements: Rc<RegionValueElements>
🔬 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?
Maps from points/universal-regions to a RegionElementIndex
.
liveness_constraints: RegionValues
🔬 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?
The liveness constraints added to each region. For most
regions, these start out empty and steadily grow, though for
each universally quantified region R they start out containing
the entire CFG and end(R)
.
inferred_values: Option<RegionValues>
🔬 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?
The final inferred values of the inference variables; None
until solve
is invoked.
dependency_map: Option<IndexVec<RegionVid, Option<ConstraintIndex>>>
🔬 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?
For each variable, stores the index of the first constraint
where that variable appears on the RHS. This is the start of a
'linked list' threaded by the next
field in Constraint
.
This map is build when values are inferred.
constraints: IndexVec<ConstraintIndex, OutlivesConstraint>
🔬 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?
The constraints we have accumulated and used during solving.
type_tests: Vec<TypeTest<'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?
Type constraints that we check after solving.
universal_regions: UniversalRegions<'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?
Information about the universally quantified regions in scope on this function and their (known) relations to one another.
Methods
impl<'gcx, 'tcx> RegionInferenceContext<'tcx>
[src]
impl<'gcx, 'tcx> RegionInferenceContext<'tcx>
pub(crate) fn annotate(&self, err: &mut DiagnosticBuilder)
[src]
pub(crate) fn annotate(&self, err: &mut DiagnosticBuilder)
🔬 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?
Write out our state into the .mir
files.
impl<'tcx> RegionInferenceContext<'tcx>
[src]
impl<'tcx> RegionInferenceContext<'tcx>
pub(crate) fn dump_mir(&self, out: &mut Write) -> Result<()>
[src]
pub(crate) fn dump_mir(&self, out: &mut Write) -> Result<()>
🔬 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?
Write out our state into the .mir
files.
fn for_each_constraint(
&self,
with_msg: &mut FnMut(&str) -> Result<()>
) -> Result<()>
[src]
fn for_each_constraint(
&self,
with_msg: &mut FnMut(&str) -> Result<()>
) -> Result<()>
🔬 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?
Debugging aid: Invokes the with_msg
callback repeatedly with
our internal region constraints. These are dumped into the
-Zdump-mir file so that we can figure out why the region
inference resulted in the values that it did when debugging.
impl<'tcx> RegionInferenceContext<'tcx>
[src]
impl<'tcx> RegionInferenceContext<'tcx>
pub(crate) fn dump_graphviz(&self, w: &mut Write) -> Result<()>
[src]
pub(crate) fn dump_graphviz(&self, w: &mut Write) -> Result<()>
🔬 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?
Write out the region constraint graph.
impl<'tcx> RegionInferenceContext<'tcx>
[src]
impl<'tcx> RegionInferenceContext<'tcx>
pub(crate) fn new(
var_infos: VarInfos,
universal_regions: UniversalRegions<'tcx>,
mir: &Mir<'tcx>,
outlives_constraints: Vec<OutlivesConstraint>,
type_tests: Vec<TypeTest<'tcx>>
) -> Self
[src]
pub(crate) fn new(
var_infos: VarInfos,
universal_regions: UniversalRegions<'tcx>,
mir: &Mir<'tcx>,
outlives_constraints: Vec<OutlivesConstraint>,
type_tests: Vec<TypeTest<'tcx>>
) -> Self
🔬 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 region inference context with a total of
num_region_variables
valid inference variables; the first N
of those will be constant regions representing the free
regions defined in universal_regions
.
The outlives_constraints
and type_tests
are an initial set
of constraints produced by the MIR type check.
fn init_universal_regions(&mut self)
[src]
fn init_universal_regions(&mut self)
🔬 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?
Initializes the region variables for each universally quantified region (lifetime parameter). The first N variables always correspond to the regions appearing in the function signature (both named and anonymous) and where clauses. This function iterates over those regions and initializes them with minimum values.
For example:
fn foo<'a, 'b>(..) where 'a: 'b
would initialize two variables like so:
R0 = { CFG, R0 } // 'a R1 = { CFG, R0, R1 } // 'b
Here, R0 represents 'a
, and it contains (a) the entire CFG
and (b) any universally quantified regions that it outlives,
which in this case is just itself. R1 ('b
) in contrast also
outlives 'a
and hence contains R0 and R1.
pub fn regions(
&self
) -> impl Iterator<Item = RegionVid>
[src]
pub fn regions(
&self
) -> impl Iterator<Item = 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?
Returns an iterator over all the region indices.
pub fn to_region_vid(&self, r: Region<'tcx>) -> RegionVid
[src]
pub fn to_region_vid(&self, r: Region<'tcx>) -> 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?
Given a universal region in scope on the MIR, returns the corresponding index.
(Panics if r
is not a registered universal region.)
pub fn region_contains_point<R>(&self, r: R, p: Location) -> bool where
R: ToRegionVid,
[src]
pub fn region_contains_point<R>(&self, r: R, p: Location) -> bool where
R: ToRegionVid,
🔬 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 true if the region r
contains the point p
.
Panics if called before solve()
executes,
pub(crate) fn region_value_str(&self, r: RegionVid) -> String
[src]
pub(crate) fn region_value_str(&self, r: RegionVid) -> String
🔬 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 access to the value of r
for debugging purposes.
pub(super) fn add_live_point(
&mut self,
v: RegionVid,
point: Location,
cause: &Cause
) -> bool
[src]
pub(super) fn add_live_point(
&mut self,
v: RegionVid,
point: Location,
cause: &Cause
) -> bool
🔬 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?
Indicates that the region variable v
is live at the point point
.
Returns true
if this constraint is new and false
is the
constraint was already present.
pub(super) fn add_outlives(
&mut self,
span: Span,
sup: RegionVid,
sub: RegionVid,
point: Location
)
[src]
pub(super) fn add_outlives(
&mut self,
span: Span,
sup: RegionVid,
sub: RegionVid,
point: Location
)
🔬 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?
Indicates that the region variable sup
must outlive sub
is live at the point point
.
pub(super) fn solve<'gcx>(
&mut self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir: &Mir<'tcx>,
mir_def_id: DefId
) -> Option<ClosureRegionRequirements<'gcx>>
[src]
pub(super) fn solve<'gcx>(
&mut self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir: &Mir<'tcx>,
mir_def_id: DefId
) -> Option<ClosureRegionRequirements<'gcx>>
🔬 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?
Perform region inference and report errors if we see any unsatisfiable constraints. If this is a closure, returns the region requirements to propagate to our creator, if any.
fn solve_inner<'gcx>(
&mut self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir: &Mir<'tcx>,
mir_def_id: DefId
) -> Option<ClosureRegionRequirements<'gcx>>
[src]
fn solve_inner<'gcx>(
&mut self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir: &Mir<'tcx>,
mir_def_id: DefId
) -> Option<ClosureRegionRequirements<'gcx>>
🔬 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?
fn propagate_constraints(&mut self, mir: &Mir<'tcx>)
[src]
fn propagate_constraints(&mut self, mir: &Mir<'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?
Propagate the region constraints: this will grow the values for each region variable until all the constraints are satisfied. Note that some values may grow too large to be feasible, but we check this later.
fn compute_region_values(&self, _mir: &Mir<'tcx>) -> RegionValues
[src]
fn compute_region_values(&self, _mir: &Mir<'tcx>) -> RegionValues
🔬 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?
fn build_dependency_map(
&mut self
) -> IndexVec<RegionVid, Option<ConstraintIndex>>
[src]
fn build_dependency_map(
&mut self
) -> IndexVec<RegionVid, Option<ConstraintIndex>>
🔬 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?
Builds up a map from each region variable X to a vector with the indices of constraints that need to be re-evaluated when X changes. These are constraints like Y: X @ P -- so if X changed, we may need to grow Y.
fn check_type_tests<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir: &Mir<'tcx>,
mir_def_id: DefId,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'gcx>>>
)
[src]
fn check_type_tests<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir: &Mir<'tcx>,
mir_def_id: DefId,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'gcx>>>
)
🔬 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 regions have been propagated, this method is used to see
whether the "type tests" produced by typeck were satisfied;
type tests encode type-outlives relationships like T: 'a
. See TypeTest
for more details.
pub fn to_error_region(&self, r: RegionVid) -> Option<Region<'tcx>>
[src]
pub fn to_error_region(&self, r: RegionVid) -> Option<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?
Converts a region inference variable into a ty::Region
that
we can use for error reporting. If r
is universally bound,
then we use the name that we have on record for it. If r
is
existentially bound, then we check its inferred value and try
to find a good name from that. Returns None
if we can't find
one (e.g., this is just some random part of the CFG).
fn try_promote_type_test<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
type_test: &TypeTest<'tcx>,
propagated_outlives_requirements: &mut Vec<ClosureOutlivesRequirement<'gcx>>
) -> bool
[src]
fn try_promote_type_test<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
type_test: &TypeTest<'tcx>,
propagated_outlives_requirements: &mut Vec<ClosureOutlivesRequirement<'gcx>>
) -> bool
🔬 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?
fn try_promote_type_test_subject<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
ty: Ty<'tcx>
) -> Option<ClosureOutlivesSubject<'gcx>>
[src]
fn try_promote_type_test_subject<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
ty: Ty<'tcx>
) -> Option<ClosureOutlivesSubject<'gcx>>
🔬 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?
When we promote a type test T: 'r
, we have to convert the
type T
into something we can store in a query result (so
something allocated for 'gcx
). This is problematic if ty
contains regions. During the course of NLL region checking, we
will have replaced all of those regions with fresh inference
variables. To create a test subject, we want to replace those
inference variables with some region from the closure
signature -- this is not always possible, so this is a
fallible process. Presuming we do find a suitable region, we
will represent it with a ReClosureBound
, which is a
RegionKind
variant that can be allocated in the gcx.
fn non_local_universal_upper_bound(&self, r: RegionVid) -> RegionVid
[src]
fn non_local_universal_upper_bound(&self, r: RegionVid) -> 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?
Given some universal or existential region r
, finds a
non-local, universal region r+
that outlives r
at entry to (and
exit from) the closure. In the worst case, this will be
'static
.
This is used for two purposes. First, if we are propagated
some requirement T: r
, we can use this method to enlarge r
to something we can encode for our creator (which only knows
about non-local, universal regions). It is also used when
encoding T
as part of try_promote_type_test_subject
(see
that fn for details).
This is based on the result 'y
of universal_upper_bound
,
except that it converts further takes the non-local upper
bound of 'y
, so that the final result is non-local.
fn universal_upper_bound(&self, r: RegionVid) -> RegionVid
[src]
fn universal_upper_bound(&self, r: RegionVid) -> 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?
Returns a universally quantified region that outlives the
value of r
(r
may be existentially or universally
quantified).
Since r
is (potentially) an existential region, it has some
value which may include (a) any number of points in the CFG
and (b) any number of end('x)
elements of universally
quantified regions. To convert this into a single universal
region we do as follows:
- Ignore the CFG points in
'r
. All universally quantified regions include the CFG anyhow. - For each
end('x)
element in'r
, compute the mutual LUB, yielding a result'y
.
fn eval_region_test(
&self,
mir: &Mir<'tcx>,
point: Location,
lower_bound: RegionVid,
test: &RegionTest
) -> bool
[src]
fn eval_region_test(
&self,
mir: &Mir<'tcx>,
point: Location,
lower_bound: RegionVid,
test: &RegionTest
) -> bool
🔬 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?
Test if test
is true when applied to lower_bound
at
point
, and returns true or false.
fn eval_outlives(
&self,
_mir: &Mir<'tcx>,
sup_region: RegionVid,
sub_region: RegionVid,
point: Location
) -> bool
[src]
fn eval_outlives(
&self,
_mir: &Mir<'tcx>,
sup_region: RegionVid,
sub_region: RegionVid,
point: Location
) -> bool
🔬 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?
fn check_universal_regions<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir_def_id: DefId,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'gcx>>>
)
[src]
fn check_universal_regions<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir_def_id: DefId,
propagated_outlives_requirements: Option<&mut Vec<ClosureOutlivesRequirement<'gcx>>>
)
🔬 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 regions have been propagated, this method is used to see whether any of the constraints were too strong. In particular, we want to check for a case where a universally quantified region exceeded its bounds. Consider:
fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
In this case, returning x
requires &'a u32 <: &'b u32
and hence we establish (transitively) a constraint that
'a: 'b
. The propagate_constraints
code above will
therefore add end('a)
into the region for 'b
-- but we
have no evidence that 'b
outlives 'a
, so we want to report
an error.
If propagated_outlives_requirements
is Some
, then we will
push unsatisfied obligations into there. Otherwise, we'll
report them as errors.
fn check_universal_region<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir_def_id: DefId,
longer_fr: RegionVid,
propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'gcx>>>
)
[src]
fn check_universal_region<'gcx>(
&self,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
mir_def_id: DefId,
longer_fr: RegionVid,
propagated_outlives_requirements: &mut Option<&mut Vec<ClosureOutlivesRequirement<'gcx>>>
)
🔬 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?
Check the final value for the free region fr
to see if it
grew too large. In particular, examine what end(X)
points
wound up in fr
's final value; for each end(X)
where X != fr
, we want to check that fr: X
. If not, that's either an
error, or something we have to propagate to our creator.
Things that are to be propagated are accumulated into the
outlives_requirements
vector.
fn report_error(
&self,
infcx: &InferCtxt<'_, '_, 'tcx>,
mir_def_id: DefId,
fr: RegionVid,
outlived_fr: RegionVid,
blame_span: Span
)
[src]
fn report_error(
&self,
infcx: &InferCtxt<'_, '_, 'tcx>,
mir_def_id: DefId,
fr: RegionVid,
outlived_fr: RegionVid,
blame_span: Span
)
🔬 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?
Report an error because the universal region fr
was required to outlive
outlived_fr
but it is not known to do so. For example:
fn foo<'a, 'b>(x: &'a u32) -> &'b u32 { x }
Here we would be invoked with fr = 'a
and outlived_fr =
'b`.
pub(crate) fn why_region_contains_point(
&self,
fr1: RegionVid,
elem: Location
) -> Option<Cause>
[src]
pub(crate) fn why_region_contains_point(
&self,
fr1: RegionVid,
elem: Location
) -> Option<Cause>
🔬 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?
fn blame_constraint(
&self,
fr1: RegionVid,
elem: impl ToElementIndex
) -> ConstraintIndex
[src]
fn blame_constraint(
&self,
fr1: RegionVid,
elem: impl ToElementIndex
) -> ConstraintIndex
🔬 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?
Tries to finds a good span to blame for the fact that fr1
contains fr2
.
fn dependencies(&self, r0: RegionVid) -> IndexVec<RegionVid, Option<usize>>
[src]
fn dependencies(&self, r0: RegionVid) -> IndexVec<RegionVid, Option<usize>>
🔬 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?
Finds all regions whose values 'a
may depend on in some way.
For each region, returns either None
(does not influence
'a
) or Some(d)
which indicates that it influences 'a
with distinct d
(minimum number of edges that must be
traversed).
Used during error reporting, extremely naive and inefficient.
Trait Implementations
impl<'this, 'tcx> Labeller<'this> for RegionInferenceContext<'tcx>
[src]
impl<'this, 'tcx> Labeller<'this> for RegionInferenceContext<'tcx>
type Node = 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?
type Edge = OutlivesConstraint
🔬 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?
fn graph_id(&'this self) -> Id<'this>
[src]
fn graph_id(&'this self) -> Id<'this>
🔬 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?
Must return a DOT compatible identifier naming the graph.
fn node_id(&'this self, n: &RegionVid) -> Id<'this>
[src]
fn node_id(&'this self, n: &RegionVid) -> Id<'this>
🔬 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?
Maps n
to a unique identifier with respect to self
. The implementor is responsible for ensuring that the returned name is a valid DOT identifier. Read more
fn node_shape(&'this self, _node: &RegionVid) -> Option<LabelText<'this>>
[src]
fn node_shape(&'this self, _node: &RegionVid) -> Option<LabelText<'this>>
🔬 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?
Maps n
to one of the [graphviz shape
names][1]. If None
is returned, no shape
attribute is specified. Read more
fn node_label(&'this self, n: &RegionVid) -> LabelText<'this>
[src]
fn node_label(&'this self, n: &RegionVid) -> LabelText<'this>
🔬 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?
Maps n
to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is just the output from node_id
. Read more
fn edge_label(&'this self, e: &OutlivesConstraint) -> LabelText<'this>
[src]
fn edge_label(&'this self, e: &OutlivesConstraint) -> LabelText<'this>
🔬 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?
Maps e
to a label that will be used in the rendered output. The label need not be unique, and may be the empty string; the default is in fact the empty string. Read more
fn node_style(&'a self, _n: &Self::Node) -> Style
[src]
fn node_style(&'a self, _n: &Self::Node) -> Style
🔬 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?
Maps n
to a style that will be used in the rendered output.
fn edge_style(&'a self, _e: &Self::Edge) -> Style
[src]
fn edge_style(&'a self, _e: &Self::Edge) -> Style
🔬 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?
Maps e
to a style that will be used in the rendered output.
impl<'this, 'tcx> GraphWalk<'this> for RegionInferenceContext<'tcx>
[src]
impl<'this, 'tcx> GraphWalk<'this> for RegionInferenceContext<'tcx>
type Node = 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?
type Edge = OutlivesConstraint
🔬 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?
fn nodes(&'this self) -> Nodes<'this, RegionVid>
[src]
fn nodes(&'this self) -> Nodes<'this, 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?
Returns all the nodes in this graph.
fn edges(&'this self) -> Edges<'this, OutlivesConstraint>
[src]
fn edges(&'this self) -> Edges<'this, OutlivesConstraint>
🔬 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 all of the edges in this graph.
fn source(&'this self, edge: &OutlivesConstraint) -> RegionVid
[src]
fn source(&'this self, edge: &OutlivesConstraint) -> 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?
The source node for edge
.
fn target(&'this self, edge: &OutlivesConstraint) -> RegionVid
[src]
fn target(&'this self, edge: &OutlivesConstraint) -> 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?
The target node for edge
.
Auto Trait Implementations
impl<'tcx> !Send for RegionInferenceContext<'tcx>
impl<'tcx> !Send for RegionInferenceContext<'tcx>
impl<'tcx> !Sync for RegionInferenceContext<'tcx>
impl<'tcx> !Sync for RegionInferenceContext<'tcx>