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)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

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

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Any statically computable Layout.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

A potentially-fat pointer.

Fields of Pointer

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

If true, this pointer is never null.

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

The type which determines the unsized metadata, if any, of this pointer. Either a type parameter or a projection depending on one, with regions erased.

Methods

impl<'a, 'tcx> SizeSkeleton<'tcx>
[src]

[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Trait Implementations

impl<'tcx> Copy for SizeSkeleton<'tcx>
[src]

impl<'tcx> Clone for SizeSkeleton<'tcx>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'tcx> Debug for SizeSkeleton<'tcx>
[src]

[src]

Formats the value using the given formatter. Read more