Conditionally drop the discriminant field in quirk_rust_enum
While debugging the crash that Jan reported, I noticed that in some
situations we could end up with a situation where one branch of a Rust
enum type ended up with a field count of -1.
The fix is simple: only conditionally drop the discriminant field when
rewriting the enum variants.
I couldn't find a way to test this; I only noticed it while debugging
the DWARF reader.
2018-04-17 Tom Tromey <tom@tromey.com>
* dwarf2read.c (quirk_rust_enum): Conditionally drop the
discriminant field.