Struct rustc_const_eval::transform::check_consts::resolver::TransferFunction [−][src]
struct TransferFunction<'a, 'mir, 'tcx, Q> {
ccx: &'a ConstCx<'mir, 'tcx>,
qualifs_per_local: &'a mut BitSet<Local>,
_qualif: PhantomData<Q>,
}
Expand description
A Visitor
that propagates qualifs between locals. This defines the transfer function of
FlowSensitiveAnalysis
.
This transfer does nothing when encountering an indirect assignment. Consumers should rely on
the MaybeMutBorrowedLocals
dataflow pass to see if a Local
may have become qualified via
an indirect assignment or function call.
Fields
ccx: &'a ConstCx<'mir, 'tcx>
qualifs_per_local: &'a mut BitSet<Local>
_qualif: PhantomData<Q>
Implementations
fn apply_call_return_effect(
&mut self,
_block: BasicBlock,
_func: &Operand<'tcx>,
_args: &[Operand<'tcx>],
return_place: Place<'tcx>
)
Trait Implementations
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<'a, 'mir, 'tcx, Q> !RefUnwindSafe for TransferFunction<'a, 'mir, 'tcx, Q>
impl<'a, 'mir, 'tcx, Q> !Send for TransferFunction<'a, 'mir, 'tcx, Q>
impl<'a, 'mir, 'tcx, Q> !Sync for TransferFunction<'a, 'mir, 'tcx, Q>
impl<'a, 'mir, 'tcx, Q> Unpin for TransferFunction<'a, 'mir, 'tcx, Q> where
Q: Unpin,
'mir: 'a,
'tcx: 'a,
impl<'a, 'mir, 'tcx, Q> !UnwindSafe for TransferFunction<'a, 'mir, 'tcx, Q>
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: 16 bytes