Open
Description
Now that it looks like #28951 will be addressed via #37429 , we may have a further obligation to ensure to do what we can to ensure that this doesn't bite people. One way that we could help out would be to randomize the order of struct fields by default when compiling in debug mode. This would only apply to structs that are not tagged with a #repr
, and would effectively act as the #[repr(random)]
proposed by @petrochenkov at #37429 (comment) (actually adding explicit #[repr(random)]
would probably require an RFC, and so is not a prereq for this issue).