[][src]Struct rustc_mir::borrow_check::constraint_generation::ConstraintGeneration

struct ConstraintGeneration<'cg, 'cx, 'tcx> {
    infcx: &'cg InferCtxt<'cx, 'tcx>,
    all_facts: &'cg mut Option<PoloniusFacts<RustcFacts>>,
    location_table: &'cg LocationTable,
    liveness_constraints: &'cg mut LivenessValues<RegionVid>,
    borrow_set: &'cg BorrowSet<'tcx>,
    body: &'cg Body<'tcx>,
}

'cg = the duration of the constraint generation process itself.

Fields

infcx: &'cg InferCtxt<'cx, 'tcx>all_facts: &'cg mut Option<PoloniusFacts<RustcFacts>>location_table: &'cg LocationTableliveness_constraints: &'cg mut LivenessValues<RegionVid>borrow_set: &'cg BorrowSet<'tcx>body: &'cg Body<'tcx>

Implementations

impl<'cx, 'cg, 'tcx> ConstraintGeneration<'cx, 'cg, 'tcx>[src]

fn add_regular_live_constraint<T>(&mut self, live_ty: T, location: Location) where
    T: TypeFoldable<'tcx>, 
[src]

Some variable with type live_ty is "regular live" at location -- i.e., it may be used later. This means that all regions appearing in the type live_ty must be live at location.

fn record_killed_borrows_for_place(
    &mut self,
    place: Place<'tcx>,
    location: Location
)
[src]

When recording facts for Polonius, records the borrows on the specified place as killed. For example, when assigning to a local, or on a call's return destination.

Trait Implementations

impl<'cg, 'cx, 'tcx> Visitor<'tcx> for ConstraintGeneration<'cg, 'cx, 'tcx>[src]

fn visit_substs(&mut self, substs: &SubstsRef<'tcx>, location: Location)[src]

We sometimes have substs within an rvalue, or within a call. Make them live at the location where they appear.

fn visit_region(&mut self, region: &Region<'tcx>, location: Location)[src]

We sometimes have region within an rvalue, or within a call. Make them live at the location where they appear.

fn visit_ty(&mut self, ty: Ty<'tcx>, ty_context: TyContext)[src]

We sometimes have ty within an rvalue, or within a call. Make them live at the location where they appear.

Auto Trait Implementations

impl<'cg, 'cx, 'tcx> !RefUnwindSafe for ConstraintGeneration<'cg, 'cx, 'tcx>

impl<'cg, 'cx, 'tcx> !Send for ConstraintGeneration<'cg, 'cx, 'tcx>

impl<'cg, 'cx, 'tcx> !Sync for ConstraintGeneration<'cg, 'cx, 'tcx>

impl<'cg, 'cx, 'tcx> Unpin for ConstraintGeneration<'cg, 'cx, 'tcx> where
    'cx: 'cg,
    'tcx: 'cg, 

impl<'cg, 'cx, 'tcx> !UnwindSafe for ConstraintGeneration<'cg, '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<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]