Skip to main content

selector_cast_preserves

Function selector_cast_preserves 

Source
fn selector_cast_preserves(
    gcx: Gcx<'_>,
    cast: &Expr<'_>,
    inner: &Expr<'_>,
) -> bool
Expand description

Whether a cast preserves the recognized selector’s value and byte alignment. A recognized integer is exactly the positive selector, so any integer width of at least 32 bits keeps it. Crossing between right-aligned integers and left-aligned fixed bytes is only trusted at the four-byte boundary.