Is there a way to get a Vec<u8> with an alignment (known at compile time) greater than 1? Preferably, where all subsequent uses of the Vec<u8>, including pushing and drop, are safe and correct. #rustlang (I *think* the answer is no, but it would simplify a problem I have.)
-
-
N.B. In my case, T = {u8, u16, u32, u64}, so it's safe to re-interpret as bytes. I don't need a fully general solution for any T. (Of course, that is certainly not possible anyway!)
Show this threadThanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
It seems this kind of stuff really needs per instance allocators. Wonder when that’s coming. The closest might be custom Vecs like in bumpalo, or implemented with DSTs like thin.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.