diff options
| author | bors <bors@rust-lang.org> | 2013-02-10 10:24:17 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-02-10 10:24:17 -0800 |
| commit | 0f04df8522cc93dfcdc0eb49f8403d305a508e58 (patch) | |
| tree | 565502e6c3c58ac189e975f1a684d620bfe2f769 /src/libsyntax | |
| parent | 9d7014e55c06a184b02ccf724497c4c72d4d2041 (diff) | |
| parent | 3742b62f64c8b2a01457b70ee37d3dc167a86a07 (diff) | |
| download | rust-0f04df8522cc93dfcdc0eb49f8403d305a508e58.tar.gz rust-0f04df8522cc93dfcdc0eb49f8403d305a508e58.zip | |
auto merge of #4866 : jld/rust/enum-unitlike, r=graydon
If an enum is isomorphic to unit, there's no need to use any bits to represent it. The only obvious reason this wasn't the case was because the enum could be C-like and have a user-specified discriminant -- but that value is constant, so it doesn't need to be stored. This change means that all newtype-like enums have the same size (and layout) as their underlying type, which might be a useful property to have, at least in terms of making programs' low-level behavior less surprising.
Diffstat (limited to 'src/libsyntax')
0 files changed, 0 insertions, 0 deletions
