Enum rustc_middle::ty::adjustment::PointerCast[][src]

pub enum PointerCast {
    ReifyFnPointer,
    UnsafeFnPointer,
    ClosureFnPointer(Unsafety),
    MutToConstPointer,
    ArrayToPointer,
    Unsize,
}

Variants

ReifyFnPointer

Go from a fn-item type to a fn-pointer type.

UnsafeFnPointer

Go from a safe fn pointer to an unsafe fn pointer.

ClosureFnPointer(Unsafety)

Go from a non-capturing closure to an fn pointer or an unsafe fn pointer. It cannot convert a closure that requires unsafe.

MutToConstPointer

Go from a mut raw pointer to a const raw pointer.

ArrayToPointer

Go from *const [T; N] to *const T

Unsize

Unsize a pointer/reference value, e.g., &[T; n] to &[T]. Note that the source could be a thin or fat pointer. This will do things like convert thin pointers to fat pointers, or convert structs containing thin pointers to structs containing fat pointers, or convert between fat pointers. We don’t store the details of how the transform is done (in fact, we don’t know that, because it might depend on the precise type parameters). We just store the target type. Codegen backends and miri figure out what has to be done based on the precise source/target type at hand.

Trait Implementations

impl Clone for PointerCast[src]

impl Copy for PointerCast[src]

impl Debug for PointerCast[src]

impl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for PointerCast[src]

impl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for PointerCast[src]

impl Eq for PointerCast[src]

impl Hash for PointerCast[src]

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for PointerCast[src]

impl<'tcx> Lift<'tcx> for PointerCast[src]

type Lifted = Self

impl PartialEq<PointerCast> for PointerCast[src]

impl StructuralEq for PointerCast[src]

impl StructuralPartialEq for PointerCast[src]

impl<'tcx> TypeFoldable<'tcx> for PointerCast[src]

Auto Trait Implementations

impl RefUnwindSafe for PointerCast

impl Send for PointerCast

impl Sync for PointerCast

impl Unpin for PointerCast

impl UnwindSafe for PointerCast

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<'tcx, T> Subst<'tcx> for T where
    T: TypeFoldable<'tcx>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]