Enum rustc::ty::layout::SizeSkeleton
[−]
[src]
pub enum SizeSkeleton<'tcx> { Known(Size), Pointer { non_zero: bool, tail: Ty<'tcx>, }, }
🔬 This is a nightly-only experimental API. (
rustc_private
)Type size "skeleton", i.e. the only information determining a type's size. While this is conservative, (aside from constant sizes, only pointers, newtypes thereof and null pointer optimized enums are allowed), it is enough to statically check common usecases of transmute.
Variants
Known(Size)
🔬 This is a nightly-only experimental API. (
rustc_private
)Any statically computable Layout.
Pointer
🔬 This is a nightly-only experimental API. (
rustc_private
)A potentially-fat pointer.
Fields of Pointer
non_zero: bool | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
tail: Ty<'tcx> | 🔬 This is a nightly-only experimental API. ( rustc_private ) |
Methods
impl<'a, 'gcx, 'tcx> SizeSkeleton<'gcx>
[src]
fn compute(ty: Ty<'gcx>,
infcx: &InferCtxt<'a, 'gcx, 'tcx>)
-> Result<SizeSkeleton<'gcx>, LayoutError<'gcx>>
infcx: &InferCtxt<'a, 'gcx, 'tcx>)
-> Result<SizeSkeleton<'gcx>, LayoutError<'gcx>>
🔬 This is a nightly-only experimental API. (
rustc_private
)fn same_size(self, other: SizeSkeleton) -> bool
🔬 This is a nightly-only experimental API. (
rustc_private
)Trait Implementations
impl<'tcx> Copy for SizeSkeleton<'tcx>
[src]
impl<'tcx> Clone for SizeSkeleton<'tcx>
[src]
fn clone(&self) -> SizeSkeleton<'tcx>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more