aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-03-09 11:33:44 -0800
committerPatrick Walton <[email protected]>2011-03-09 12:53:12 -0800
commitfcd195bb4ca47d4b3c7dfd3e6c14dc5771e139cc (patch)
treebbbed9d03385dcece7f7971033b3dfac1ce4d2ed /src/comp
parentPass the task pointer as just another i32. (diff)
downloadrust-fcd195bb4ca47d4b3c7dfd3e6c14dc5771e139cc.tar.xz
rust-fcd195bb4ca47d4b3c7dfd3e6c14dc5771e139cc.zip
rustc: Don't try to load dynamically-sized types when translating tag variants. Add a test case for this.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 0b513744..2ad33968 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -4920,7 +4920,8 @@ fn trans_tag_variant(@crate_ctxt cx, ast.def_id tag_id,
auto arg_ty = arg_tys.(i).ty;
auto llargval;
- if (ty.type_is_structural(arg_ty)) {
+ if (ty.type_is_structural(arg_ty) ||
+ ty.type_has_dynamic_size(arg_ty)) {
llargval = llargptr;
} else {
llargval = bcx.build.Load(llargptr);