diff options
| author | bors <bors@rust-lang.org> | 2013-07-06 23:59:05 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-07-06 23:59:05 -0700 |
| commit | 88487d8274a51afa253d9f9612991621f1ec4fd0 (patch) | |
| tree | 4fe4653c07ec78158432ee4ab922a7e6561c7e47 /src/rt/rust_kernel.cpp | |
| parent | b16825216e7b4196a88b103cd6921d8cdb0ba7be (diff) | |
| parent | 866a5b1c78e52bd5c1c34df4a1a3c363ad6bfe7c (diff) | |
| download | rust-88487d8274a51afa253d9f9612991621f1ec4fd0.tar.gz rust-88487d8274a51afa253d9f9612991621f1ec4fd0.zip | |
auto merge of #7557 : michaelwoerister/rust/enum_structs, r=pcwalton
After getting an ICE trying to use the `Repr` enum from middle::trans::adt (see issue #7527), I tried to implement the missing case for struct-like enum variants in `middle::ty::enum_variants()`. It seems to work now (and passes make check) but there are still some uncertainties that bother me: + I'm not sure I did everything, right. Especially getting the variant constructor function from the variant node id is just copied from the tuple-variant case. Someone with more experience in the code base should be able to see rather quickly whether this OK so. + It is kind of strange that I could not reproduce the ICE with a smaller test case. The unimplemented code path never seems to be hit in most cases, even when using the exact same `Repr` enum, just with `ty::t` replaced by an opaque pointer. Also, within the `adt` module, `Repr` and matching on it is used multiple times, again without running into problems. Can anyone explain why this is the case? That would be much appreciated. Apart from that, I hope this PR is useful.
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions
