Enum flowistry_pdg::rustc::mir::CastKind
source · pub enum CastKind {
PointerExposeAddress,
PointerFromExposedAddress,
PointerCoercion(PointerCoercion),
DynStar,
IntToInt,
FloatToInt,
FloatToFloat,
IntToFloat,
PtrToPtr,
FnPtrToPtr,
Transmute,
}
Variants§
PointerExposeAddress
An exposing pointer to address cast. A cast between a pointer and an integer type, or
between a function pointer and an integer type.
See the docs on expose_addr
for more details.
PointerFromExposedAddress
An address-to-pointer cast that picks up an exposed provenance.
See the docs on from_exposed_addr
for more details.
PointerCoercion(PointerCoercion)
Pointer related casts that are done by coercions. Note that reference-to-raw-ptr casts are
translated into &raw mut/const *r
, i.e., they are not actually casts.
DynStar
Cast into a dyn* object.
IntToInt
FloatToInt
FloatToFloat
IntToFloat
PtrToPtr
FnPtrToPtr
Transmute
Reinterpret the bits of the input as a different type.
MIR is well-formed if the input and output types have different sizes, but running a transmute between differently-sized types is UB.
Allowed only in MirPhase::Runtime
; Earlier it’s a TerminatorKind::Call
.
Auto Trait Implementations§
impl RefUnwindSafe for CastKind
impl Send for CastKind
impl Sync for CastKind
impl Unpin for CastKind
impl UnwindSafe for CastKind
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more