[][src]Trait rfc::core::mem::AlignLtEq

pub trait AlignLtEq<Rhs, Neglect = ()> where
    Neglect: TransmuteOptions
{ }
🔬 This is a nightly-only experimental API. (query)

Implemented if align_of::<Self>() <= align_of::<Rhs>()

Implementors

impl<Lhs, Rhs, Neglect> AlignLtEq<Rhs, Neglect> for Lhs where
    Neglect: TransmuteOptions,
    &'a [Lhs; 0]: TransmuteFrom<&'a [Rhs; 0], Neglect>, 
[src]

By wrapping a type in a zero-sized array, we neutralize its validity and size qualities. The only quality by which [Lhs; 0] and [Dst; 0] can differ is their alignment. We check only if the alignment of Lhs is less than Rhs by transmuting between references of these zero-sized gadgets.

Loading content...