about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-05-19 14:57:24 -0700
committerCorey Richardson <corey@octayn.net>2014-05-22 23:01:47 -0700
commitc327080ee04e641a34f30ae71b713a91106680b1 (patch)
tree317ee37ca57fcec6e16d6c69fdd20c4494957d4a /src/rustllvm/RustWrapper.cpp
parentf122ad08a57d3e250f0c8c5036327eaa320dd4eb (diff)
downloadrust-c327080ee04e641a34f30ae71b713a91106680b1.tar.gz
rust-c327080ee04e641a34f30ae71b713a91106680b1.zip
rustc: add a lint for large enum variants
It can be easy to accidentally bloat the size of an enum by making one variant
larger than the others. When this happens, it usually goes unnoticed. This
commit adds a lint that can warn when the largest variant in an enum is more
than 3 times larger than the second-largest variant. This requires a little
bit of rejiggering, because size information is only available in trans, but
lint levels are only available in the lint context.

It is allow by default because it's pretty noisy, and isn't really *that*
undesirable.

Closes #10362
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions