I don’t quite follow this paragraph:
A repr© struct cannot have a ?Sized field. … This of
course implies tuples are not repr©, and their padding is usually unspecified.
What do tuples have to do with having a ?Sized field?
One concern I have is with disallowing repr(C) on DSTs: it’s fairly common in C code to use structs with a zero or one element fixed size array as the last field, whose closest translation to rust code would be a DST. repr(fixed) is not a great solution because a fixed layout does not imply a C-compatible layout.
What’s the downside to making repr(C) more permissive - as long as there’s a well defined C equivalent to a given rust type, repr(C) could work.
At the very least I’m against ignoring repr(C) and only issueing a warning: if it’s ignored it should most definitely be an error, as the code almost certainly interfaces with C code and depends on the types being layout compatible. Backwards compatibility means that old code should still work, not that it should compile but then have undefined behaviour!