macro_rules! check_misalign16 {
($ptr:expr) => { ... };
}Expand description
Checks that an address is aligned to a 16 byte bound.
If the result is non-zero, that’s how many bytes past the most recent 16 byte bound you are.
#[macro_use]
extern crate retro_pixel;
fn main() {
for x in 0 .. 100 {
assert_eq!(check_misalign16!(x), x % 16);
}
}