Function vstd::layout::valid_layout

source ·
pub open spec fn valid_layout(size: usize, align: usize) -> bool
Expand description
{
    is_power_2(align as int)
        && size <= isize::MAX as int - (isize::MAX as int % align as int)
}

Matches the conditions here: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html