[−][src]Struct rustc_mir::interpret::validity::ValidityVisitor
Fields
path: Vec<PathElem>The path may be pushed to, but the part that is present when a function
starts must not be changed! visit_fields and visit_array rely on
this stack discipline.
ref_tracking: Option<&'rt mut RefTracking<MPlaceTy<'tcx, M::PointerTag>, Vec<PathElem>>>ctfe_mode: Option<CtfeValidationMode>None indicates this is not validating for CTFE (but for runtime).
ecx: &'rt InterpCx<'mir, 'tcx, M>Implementations
impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, 'tcx, M>[src]
pub(in interpret::validity) fn aggregate_field_path_elem(
&mut self,
layout: TyAndLayout<'tcx>,
field: usize
) -> PathElem[src]
&mut self,
layout: TyAndLayout<'tcx>,
field: usize
) -> PathElem
pub(in interpret::validity) fn with_elem<R>(
&mut self,
elem: PathElem,
f: impl FnOnce(&mut Self) -> InterpResult<'tcx, R>
) -> InterpResult<'tcx, R>[src]
&mut self,
elem: PathElem,
f: impl FnOnce(&mut Self) -> InterpResult<'tcx, R>
) -> InterpResult<'tcx, R>
pub(in interpret::validity) fn check_wide_ptr_meta(
&mut self,
meta: MemPlaceMeta<M::PointerTag>,
pointee: TyAndLayout<'tcx>
) -> InterpResult<'tcx>[src]
&mut self,
meta: MemPlaceMeta<M::PointerTag>,
pointee: TyAndLayout<'tcx>
) -> InterpResult<'tcx>
pub(in interpret::validity) fn check_safe_pointer(
&mut self,
value: OpTy<'tcx, M::PointerTag>,
kind: &str
) -> InterpResult<'tcx>[src]
&mut self,
value: OpTy<'tcx, M::PointerTag>,
kind: &str
) -> InterpResult<'tcx>
Check a reference or Box.
pub(in interpret::validity) fn try_visit_primitive(
&mut self,
value: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx, bool>[src]
&mut self,
value: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx, bool>
Check if this is a value of primitive type, and if yes check the validity of the value
at that type. Return true if the type is indeed primitive.
pub(in interpret::validity) fn visit_scalar(
&mut self,
op: OpTy<'tcx, M::PointerTag>,
scalar_layout: &Scalar
) -> InterpResult<'tcx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>,
scalar_layout: &Scalar
) -> InterpResult<'tcx>
Trait Implementations
impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M> for ValidityVisitor<'rt, 'mir, 'tcx, M>[src]
type V = OpTy<'tcx, M::PointerTag>
pub fn ecx(&self) -> &InterpCx<'mir, 'tcx, M>[src]
pub fn read_discriminant(
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx, VariantIdx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx, VariantIdx>
pub fn visit_field(
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
field: usize,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>[src]
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
field: usize,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>
pub fn visit_variant(
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
variant_id: VariantIdx,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>[src]
&mut self,
old_op: OpTy<'tcx, M::PointerTag>,
variant_id: VariantIdx,
new_op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>
pub fn visit_union(
&mut self,
_op: OpTy<'tcx, M::PointerTag>,
_fields: NonZeroUsize
) -> InterpResult<'tcx>[src]
&mut self,
_op: OpTy<'tcx, M::PointerTag>,
_fields: NonZeroUsize
) -> InterpResult<'tcx>
pub fn visit_value(
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>
) -> InterpResult<'tcx>
pub fn visit_aggregate(
&mut self,
op: OpTy<'tcx, M::PointerTag>,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>[src]
&mut self,
op: OpTy<'tcx, M::PointerTag>,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>
pub fn walk_aggregate(
&mut self,
v: Self::V,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>[src]
&mut self,
v: Self::V,
fields: impl Iterator<Item = InterpResult<'tcx, Self::V>>
) -> InterpResult<'tcx>
pub fn walk_value(&mut self, v: Self::V) -> InterpResult<'tcx>[src]
Auto Trait Implementations
impl<'rt, 'mir, 'tcx, M> !RefUnwindSafe for ValidityVisitor<'rt, 'mir, 'tcx, M>
impl<'rt, 'mir, 'tcx, M> !Send for ValidityVisitor<'rt, 'mir, 'tcx, M>
impl<'rt, 'mir, 'tcx, M> !Sync for ValidityVisitor<'rt, 'mir, 'tcx, M>
impl<'rt, 'mir, 'tcx, M> Unpin for ValidityVisitor<'rt, 'mir, 'tcx, M> where
'mir: 'rt,
'tcx: 'rt,
'mir: 'rt,
'tcx: 'rt,
impl<'rt, 'mir, 'tcx, M> !UnwindSafe for ValidityVisitor<'rt, 'mir, 'tcx, M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.