Description
Many times it easy to accidentally create types that are many bytes in size. These structures are of course expensive to copy, and move around. Because there is already an option to check the size of structures in rustc (-Z count-type-sizes) it'd be nice to have a warning if some the sizes of some data structures are suspiciously large. I'd greatly appreciate this "-W large-type-sizes" feature as it'd reduce the chances of accidentally creating slow programs with silly mistakes, and already has a lot of the work done towards it implemented. Furthermore, giant know everything objects are usually a sign of a badly factored design.
As well, it might be useful to have a warning for medium sized data types that have sizes that are powers of two as they can have weird, and pathological worst-case effects on CPU caches (I don't fully understand exactly how they effect the cache so I'd appreciate if someone with a more detailed knowledge of cache effects can comment on whether this is a good idea.)
Basically, I think that as long as the type size information is already being collected it should start being used.