Macro static_assertions::assert_eq_size_ptr [] [src]

macro_rules! assert_eq_size_ptr {
    ($x:expr, $($xs:expr),+ $(,)*) => { ... };
}

Asserts at compile-time that the values pointed to have equal sizes.

This especially is useful for when coercing pointers between different types and ensuring the underlying values are the same size.

Example

fn operation(x: &(u32, u32), y: &[u16; 4]) {
    assert_eq_size_ptr!(x, y);
}