diff options
| author | Michael Kainer <kaini1123@gmail.com> | 2014-09-29 18:27:07 +0200 |
|---|---|---|
| committer | Michael Kainer <kaini1123@gmail.com> | 2014-09-30 16:22:55 +0200 |
| commit | 065a5b0424221b246d59fd068d4e6eb5d1ae5be1 (patch) | |
| tree | 7b81f6081330ea2719bf66ba7582d2ea79ec595e /src/rustllvm/PassWrapper.cpp | |
| parent | d2f8d4c5050be01923f28308b71ad14a2776b30e (diff) | |
| download | rust-065a5b0424221b246d59fd068d4e6eb5d1ae5be1.tar.gz rust-065a5b0424221b246d59fd068d4e6eb5d1ae5be1.zip | |
Fixes ICE when using reexported unit-like structs
Fixes that unit-like structs cannot be used if they are reexported and
used in another crate. The compiler fails with an ICE, because unit-like
structs are exported as DefFn and the expression `UnitStruct` is
interpreted as function pointer instead of a call to the constructor.
To resolve this ambiguity tuple-like struct constructors are now exported
as CtorFn. When `rustc::metadata::decoder` finds a CtorFn it sets a new
flag `is_ctor` in DefFn to true.
Relevant changes are in `rustc::metadata::{encoder, decoder}` and in
`rustc::middle::ty`.
Closes #12660 and #16973.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
