about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-01 11:27:23 +0000
committerbors <bors@rust-lang.org>2014-10-01 11:27:23 +0000
commit8ab6fce95e9b8a4ed27ecb7bee69784a02610e1d (patch)
tree1fba572bb05c2be5fd0dbe66dd74967b1e2958a9 /src/rustllvm/PassWrapper.cpp
parentff2616e847ddf913e007d715732b5669b0f22672 (diff)
parent065a5b0424221b246d59fd068d4e6eb5d1ae5be1 (diff)
downloadrust-8ab6fce95e9b8a4ed27ecb7bee69784a02610e1d.tar.gz
rust-8ab6fce95e9b8a4ed27ecb7bee69784a02610e1d.zip
auto merge of #17653 : kaini/rust/master, r=alexcrichton
Fixes that unit-like structs cannot be used if they are re-exported and used in another crate. (ICE)
The relevant changes are in `rustc::metadata::{decoder, encoder}` and `rustc::middle::ty`.

A test case is included.

The problem is that the expressoin `UnitStruct` is an `ExprPath` to an `DefFn`, which is of expr kind `RvalueDatumExpr`, but for unit-struct ctors the expr kind should be `RvalueDpsExpr`. I fixed this (in a I guess clean way) by introducing `CtorFn` in the metadata and including a `is_ctor` flag in `DefFn`.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions