@eddyb is there a cheap way to iterate an aggregate's fields sorted by offset? Seems the list on the layout is sorted by original field definition order. Currently I then sort a list of indices by their offsets, but that requires an allocation.
yes it's how the LLVM backend works
you could've also just, you know, looked at the API :D
I did, but it seems I was blind. Sorry!
heh, it's fine. I was mostly happy that it was at least somewhat discoverable, since there's a general issue of not being able to find "how do I do X" in rustc's codebase