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

pub enum PointerCast {



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


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


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


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


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


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

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

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

impl<T, U> Into<U> for T where
    U: From<T>, 

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

type Error = !

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]