[−][src]Struct rustc_infer::infer::lexical_region_resolve::LexicalResolver

pub(in infer::lexical_region_resolve) struct LexicalResolver<'cx, 'tcx> {
    region_rels: &'cx RegionRelations<'cx, 'tcx>,
    var_infos: VarInfos,
    data: RegionConstraintData<'tcx>,
}

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]

pub(in infer::lexical_region_resolve) fn infer_variable_values(
    &mut self,
    errors: &mut Vec<RegionResolutionError<'tcx>>
) -> LexicalRegionResolutions<'tcx>
[src]

pub(in infer::lexical_region_resolve) fn num_vars(
    &self
) -> usize
[src]

pub(in infer::lexical_region_resolve) fn construct_var_data(
    &self,
    tcx: TyCtxt<'tcx>
) -> LexicalRegionResolutions<'tcx>
[src]

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]

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]

pub(in infer::lexical_region_resolve) fn expand_givens(
    &mut self,
    graph: &Graph<(), Constraint<'_>>
)
[src]

pub(in infer::lexical_region_resolve) fn enforce_member_constraints(
    &self,
    graph: &Graph<(), Constraint<'tcx>>,
    var_values: &mut LexicalRegionResolutions<'tcx>
) -> bool
[src]

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]

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]

pub(in infer::lexical_region_resolve) fn expand_node(
    &self,
    a_region: Region<'tcx>,
    b_vid: RegionVid,
    b_data: &mut VarValue<'tcx>
) -> bool
[src]

pub(in infer::lexical_region_resolve) fn sub_concrete_regions(
    &self,
    a: Region<'tcx>,
    b: Region<'tcx>
) -> bool
[src]

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]

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]

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]

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]

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]

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]

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 bool that'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]

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, 

impl<'cx, 'tcx> !UnwindSafe for LexicalResolver<'cx, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]