diff options
| author | Patrick Walton <[email protected]> | 2011-03-02 18:23:38 -0800 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-03-02 18:23:38 -0800 |
| commit | 675f762621a0e2bb7d746e82bcafa05650786b94 (patch) | |
| tree | a149a529b1156bf48f57c07e0d4d5db7a1d1f03c /src | |
| parent | rustc: Remove unused call to type_of() in trans_tup() (diff) | |
| download | rust-675f762621a0e2bb7d746e82bcafa05650786b94.tar.xz rust-675f762621a0e2bb7d746e82bcafa05650786b94.zip | |
rustc: Have make_generic_glue pass an opaque type instead of an incorrect type in the case of dynamically sized types
Diffstat (limited to 'src')
| -rw-r--r-- | src/comp/middle/trans.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 4708ffc5..3d4f44ea 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -1267,7 +1267,9 @@ fn make_generic_glue(@crate_ctxt cx, @ty.t t, str name, auto re; if (!ty.type_is_scalar(t)) { auto llty; - if (ty.type_is_structural(t)) { + if (ty.type_has_dynamic_size(t)) { + llty = T_ptr(T_i8()); + } else if (ty.type_is_structural(t)) { llty = T_ptr(type_of(cx, t)); } else { llty = type_of(cx, t); |