Function maybe_is_aligned

pub(crate) const fn maybe_is_aligned(ptr: *const (), align: usize) -> bool

Checks whether ptr is properly aligned with respect to the given alignment.

In const this is approximate and can fail spuriously. It is primarily intended for assert_unsafe_precondition! with check_language_ub, in which case the check is anyway not executed in const.