6 ms·
A classic example is when you're writing a custom allocator and need to align the address. Another is storing pointers in a hash table - you need to do arithme
by mh7 4y ago
A classic example is when you're writing a custom allocator and need to align the address.
Another is storing pointers in a hash table - you need to do arithmetic on the pointer bits to compute the hash.
- Gankra 4y agoI already designed several new convenience methods for making this kind of thing simple and the PR to rust-lang is already open :)