The difference is that repr(C) (versus repr(packed)) modifies compiler-level semantics. They don’t affect rust as a high-level language, just how the compiled binary interacts with other programs and the hardware. In general, I’m fine having representation affect unsafe operations.
Good point. I withdraw my objection (to repr(thin), I still object to repr(packed) but that ship has sailed).
Unless I’m mistaken, the compiler could theoretically apply repr(thin) automatically to all traits not implemented on foreign types. If that’s the case, this really is just a compiler hint saying “compiler, don’t allow me to do something that will disallow this optimization” and doesn’t affect API.