[−][src]Struct rustc_infer::infer::lexical_region_resolve::LexicalResolver
Fields
region_rels: &'cx RegionRelations<'cx, 'tcx>var_infos: VarInfosdata: RegionConstraintData<'tcx>Implementations
impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx>[src]
pub(in infer::lexical_region_resolve) fn tcx(
&self
) -> TyCtxt<'tcx>[src]
&self
) -> TyCtxt<'tcx>
pub(in infer::lexical_region_resolve) fn infer_variable_values(
&mut self,
errors: &mut Vec<RegionResolutionError<'tcx>>
) -> LexicalRegionResolutions<'tcx>[src]
&mut self,
errors: &mut Vec<RegionResolutionError<'tcx>>
) -> LexicalRegionResolutions<'tcx>
pub(in infer::lexical_region_resolve) fn num_vars(
&self
) -> usize[src]
&self
) -> usize
pub(in infer::lexical_region_resolve) fn construct_var_data(
&self,
tcx: TyCtxt<'tcx>
) -> LexicalRegionResolutions<'tcx>[src]
&self,
tcx: TyCtxt<'tcx>
) -> LexicalRegionResolutions<'tcx>
Initially, the value for all variables is set to 'empty, the
empty region. The expansion phase will grow this larger.
pub(in infer::lexical_region_resolve) fn erased_data(
&self,
tcx: TyCtxt<'tcx>
) -> LexicalRegionResolutions<'tcx>[src]
&self,
tcx: TyCtxt<'tcx>
) -> LexicalRegionResolutions<'tcx>
An erased version of the lexical region resolutions. Used when we're
erasing regions and suppressing errors: in item bodies with
-Zborrowck=mir.
pub(in infer::lexical_region_resolve) fn dump_constraints(
&self,
free_regions: &RegionRelations<'_, 'tcx>
)[src]
&self,
free_regions: &RegionRelations<'_, 'tcx>
)
pub(in infer::lexical_region_resolve) fn expand_givens(
&mut self,
graph: &Graph<(), Constraint<'_>>
)[src]
&mut self,
graph: &Graph<(), Constraint<'_>>
)
pub(in infer::lexical_region_resolve) fn enforce_member_constraints(
&self,
graph: &Graph<(), Constraint<'tcx>>,
var_values: &mut LexicalRegionResolutions<'tcx>
) -> bool[src]
&self,
graph: &Graph<(), Constraint<'tcx>>,
var_values: &mut LexicalRegionResolutions<'tcx>
) -> bool
Enforce all member constraints and return true if anything
changed. See enforce_member_constraint for more details.
pub(in infer::lexical_region_resolve) fn enforce_member_constraint(
&self,
graph: &Graph<(), Constraint<'tcx>>,
member_constraint: &MemberConstraint<'tcx>,
var_values: &mut LexicalRegionResolutions<'tcx>
) -> bool[src]
&self,
graph: &Graph<(), Constraint<'tcx>>,
member_constraint: &MemberConstraint<'tcx>,
var_values: &mut LexicalRegionResolutions<'tcx>
) -> bool
Enforce a constraint like
'r member of ['c...]
We look for all choice regions from the list 'c... that:
(a) are greater than the current value of 'r (which is a lower bound)
and
(b) are compatible with the upper bounds of 'r that we can
find by traversing the graph.
From that list, we look for a minimal option 'c_min. If we
find one, then we can enforce that 'r: 'c_min.
pub(in infer::lexical_region_resolve) fn expansion(
&self,
var_values: &mut LexicalRegionResolutions<'tcx>
)[src]
&self,
var_values: &mut LexicalRegionResolutions<'tcx>
)
pub(in infer::lexical_region_resolve) fn expand_node(
&self,
a_region: Region<'tcx>,
b_vid: RegionVid,
b_data: &mut VarValue<'tcx>
) -> bool[src]
&self,
a_region: Region<'tcx>,
b_vid: RegionVid,
b_data: &mut VarValue<'tcx>
) -> bool
pub(in infer::lexical_region_resolve) fn sub_concrete_regions(
&self,
a: Region<'tcx>,
b: Region<'tcx>
) -> bool[src]
&self,
a: Region<'tcx>,
b: Region<'tcx>
) -> bool
True if a <= b, but not defined over inference variables.
pub(in infer::lexical_region_resolve) fn lub_concrete_regions(
&self,
a: Region<'tcx>,
b: Region<'tcx>
) -> Region<'tcx>[src]
&self,
a: Region<'tcx>,
b: Region<'tcx>
) -> Region<'tcx>
Returns the least-upper-bound of a and b; i.e., the
smallest region c such that a <= c and b <= c.
Neither a nor b may be an inference variable (hence the
term "concrete regions").
pub(in infer::lexical_region_resolve) fn collect_errors(
&self,
var_data: &mut LexicalRegionResolutions<'tcx>,
errors: &mut Vec<RegionResolutionError<'tcx>>
)[src]
&self,
var_data: &mut LexicalRegionResolutions<'tcx>,
errors: &mut Vec<RegionResolutionError<'tcx>>
)
After expansion is complete, go and check upper bounds (i.e., cases where the region cannot grow larger than a fixed point) and check that they are satisfied.
pub(in infer::lexical_region_resolve) fn collect_var_errors(
&self,
var_data: &LexicalRegionResolutions<'tcx>,
graph: &Graph<(), Constraint<'tcx>>,
errors: &mut Vec<RegionResolutionError<'tcx>>
)[src]
&self,
var_data: &LexicalRegionResolutions<'tcx>,
graph: &Graph<(), Constraint<'tcx>>,
errors: &mut Vec<RegionResolutionError<'tcx>>
)
Go over the variables that were declared to be error variables
and create a RegionResolutionError for each of them.
pub(in infer::lexical_region_resolve) fn construct_graph(
&self
) -> Graph<(), Constraint<'tcx>>[src]
&self
) -> Graph<(), Constraint<'tcx>>
pub(in infer::lexical_region_resolve) fn collect_error_for_expanding_node(
&self,
graph: &Graph<(), Constraint<'tcx>>,
dup_vec: &mut IndexVec<RegionVid, Option<RegionVid>>,
node_idx: RegionVid,
errors: &mut Vec<RegionResolutionError<'tcx>>
)[src]
&self,
graph: &Graph<(), Constraint<'tcx>>,
dup_vec: &mut IndexVec<RegionVid, Option<RegionVid>>,
node_idx: RegionVid,
errors: &mut Vec<RegionResolutionError<'tcx>>
)
pub(in infer::lexical_region_resolve) fn collect_bounding_regions(
&self,
graph: &Graph<(), Constraint<'tcx>>,
orig_node_idx: RegionVid,
dir: Direction,
dup_vec: Option<&mut IndexVec<RegionVid, Option<RegionVid>>>
) -> (Vec<RegionAndOrigin<'tcx>>, FxHashSet<RegionVid>, bool)[src]
&self,
graph: &Graph<(), Constraint<'tcx>>,
orig_node_idx: RegionVid,
dir: Direction,
dup_vec: Option<&mut IndexVec<RegionVid, Option<RegionVid>>>
) -> (Vec<RegionAndOrigin<'tcx>>, FxHashSet<RegionVid>, bool)
Collects all regions that "bound" the variable orig_node_idx in the
given direction.
If dup_vec is Some it's used to track duplicates between successive
calls of this function.
The return tuple fields are:
- a list of all concrete regions bounding the given region.
- the set of all region variables bounding the given region.
- a
boolthat's true if the returned region variables overlap with those returned by a previous call for another region.
pub(in infer::lexical_region_resolve) fn bound_is_met(
&self,
bound: &VerifyBound<'tcx>,
var_values: &LexicalRegionResolutions<'tcx>,
generic_ty: Ty<'tcx>,
min: Region<'tcx>
) -> bool[src]
&self,
bound: &VerifyBound<'tcx>,
var_values: &LexicalRegionResolutions<'tcx>,
generic_ty: Ty<'tcx>,
min: Region<'tcx>
) -> bool
Auto Trait Implementations
impl<'cx, 'tcx> !RefUnwindSafe for LexicalResolver<'cx, 'tcx>
impl<'cx, 'tcx> !Send for LexicalResolver<'cx, 'tcx>
impl<'cx, 'tcx> !Sync for LexicalResolver<'cx, 'tcx>
impl<'cx, 'tcx> Unpin for LexicalResolver<'cx, 'tcx> where
'tcx: 'cx,
'tcx: 'cx,
impl<'cx, 'tcx> !UnwindSafe for LexicalResolver<'cx, 'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.