Skip to main content

## layout_is_noundef

# Function layout_is_noundef

Source

    fn layout_is_noundef<'a, Ty, C>(layout: TyAndLayout<'a, Ty>, cx: &C) -> boolwhere
        Ty: TyAbiInterface<'a, C> + Copy,
        C: HasDataLayout,

Expand description

Determines whether `layout` contains no uninit bytes (no padding, no unions), using only the computed layout.

Conservative: returns `false` for anything it cannot prove fully initialized, including multi-variant enums and SIMD vectors.