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 AllFacts
location_table: &'cx LocationTable
body: &'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<'tcx>,
variance: &Variance,
user_ty: &UserTypeProjection,
location: Location
)
fn visit_projection(
&mut self,
place_ref: PlaceRef<'tcx>,
context: PlaceContext,
location: Location
)
fn visit_projection_elem(
&mut self,
local: Local,
proj_base: &[ProjectionElem<Local, &'tcx TyS<'tcx>>],
elem: ProjectionElem<Local, &'tcx TyS<'tcx>>,
context: PlaceContext,
location: Location
)
fn super_projection(
&mut self,
place_ref: PlaceRef<'tcx>,
context: PlaceContext,
location: Location
)
fn super_projection_elem(
&mut self,
_local: Local,
_proj_base: &[ProjectionElem<Local, &'tcx TyS<'tcx>>],
elem: ProjectionElem<Local, &'tcx TyS<'tcx>>,
_context: PlaceContext,
location: Location
)
fn visit_user_type_annotation(
&mut self,
index: UserTypeAnnotationIndex,
ty: &CanonicalUserTypeAnnotation<'tcx>
)
fn super_ascribe_user_ty(
&mut self,
place: &Place<'tcx>,
_variance: &Variance,
user_ty: &UserTypeProjection,
location: Location
)
fn super_user_type_annotation(
&mut self,
_index: UserTypeAnnotationIndex,
ty: &CanonicalUserTypeAnnotation<'tcx>
)
Auto Trait Implementations
impl<'cx, 'tcx> !RefUnwindSafe for InvalidationGenerator<'cx, 'tcx>
impl<'cx, 'tcx> !Send for InvalidationGenerator<'cx, 'tcx>
impl<'cx, 'tcx> !Sync for InvalidationGenerator<'cx, 'tcx>
impl<'cx, 'tcx> Unpin for InvalidationGenerator<'cx, 'tcx> where
'tcx: 'cx,
impl<'cx, 'tcx> !UnwindSafe for InvalidationGenerator<'cx, 'tcx>
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