about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-06 23:59:05 -0700
committerbors <bors@rust-lang.org>2013-07-06 23:59:05 -0700
commit88487d8274a51afa253d9f9612991621f1ec4fd0 (patch)
tree4fe4653c07ec78158432ee4ab922a7e6561c7e47 /src/rt/rust_kernel.cpp
parentb16825216e7b4196a88b103cd6921d8cdb0ba7be (diff)
parent866a5b1c78e52bd5c1c34df4a1a3c363ad6bfe7c (diff)
downloadrust-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