Struct rustc_borrowck::invalidation::InvalidationGenerator [−][src]
struct InvalidationGenerator<'cx, 'tcx> {
tcx: TyCtxt<'tcx>,
all_facts: &'cx mut AllFacts,
location_table: &'cx LocationTable,
body: &'cx Body<'tcx>,
dominators: Dominators<BasicBlock>,
borrow_set: &'cx BorrowSet<'tcx>,
}Fields
tcx: TyCtxt<'tcx>all_facts: &'cx mut AllFactslocation_table: &'cx LocationTablebody: &'cx Body<'tcx>dominators: Dominators<BasicBlock>borrow_set: &'cx BorrowSet<'tcx>Implementations
fn mutate_place(
&mut self,
location: Location,
place: Place<'tcx>,
kind: AccessDepth,
_mode: MutateMode
)
fn mutate_place(
&mut self,
location: Location,
place: Place<'tcx>,
kind: AccessDepth,
_mode: MutateMode
)
Simulates mutation of a place.
Simulates consumption of an operand.
fn access_place(
&mut self,
location: Location,
place: Place<'tcx>,
kind: (AccessDepth, ReadOrWrite),
_is_local_mutation_allowed: LocalMutationIsAllowed
)
fn access_place(
&mut self,
location: Location,
place: Place<'tcx>,
kind: (AccessDepth, ReadOrWrite),
_is_local_mutation_allowed: LocalMutationIsAllowed
)
Simulates an access to a place.
fn check_access_for_conflict(
&mut self,
location: Location,
place: Place<'tcx>,
sd: AccessDepth,
rw: ReadOrWrite
)
Generates a new loan_invalidated_at(L, B) fact.
Trait Implementations
Visits the whole MIR and generates invalidates() facts.
Most of the code implementing this was stolen from borrow_check/mod.rs.
fn visit_ascribe_user_ty(
&mut self,
place: &Place,
variance: &Variance,
user_ty: &UserTypeProjection,
location: Location
)
fn visit_projection(
&mut self,
place_ref: PlaceRef,
context: PlaceContext,
location: Location
)
fn visit_projection_elem(
&mut self,
local: Local,
proj_base: &[ProjectionElem<Local, &TyS>],
elem: ProjectionElem<Local, &TyS>,
context: PlaceContext,
location: Location
)
fn super_projection(
&mut self,
place_ref: PlaceRef,
context: PlaceContext,
location: Location
)
fn super_projection_elem(
&mut self,
_local: Local,
_proj_base: &[ProjectionElem<Local, &TyS>],
elem: ProjectionElem<Local, &TyS>,
_context: PlaceContext,
location: Location
)
fn visit_user_type_annotation(
&mut self,
index: UserTypeAnnotationIndex,
ty: &CanonicalUserTypeAnnotation
)
fn super_ascribe_user_ty(
&mut self,
place: &Place,
_variance: &Variance,
user_ty: &UserTypeProjection,
location: Location
)
fn super_user_type_annotation(
&mut self,
_index: UserTypeAnnotationIndex,
ty: &CanonicalUserTypeAnnotation
)
Auto Trait Implementations
impl<'cx, 'tcx> !RefUnwindSafe for InvalidationGenerator
impl<'cx, 'tcx> !Send for InvalidationGenerator
impl<'cx, 'tcx> !Sync for InvalidationGenerator
impl<'cx, 'tcx> Unpin for InvalidationGenerator where
'tcx: 'cx,
impl<'cx, 'tcx> !UnwindSafe for InvalidationGenerator
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 88 bytes
