rustc: Have make_generic_glue pass an opaque type instead of an incorrect type in the case of dynamically sized types

This commit is contained in:
Patrick Walton 2011-03-02 18:23:38 -08:00
parent 792af12a3c
commit 675f762621

View File

@ -1267,7 +1267,9 @@ fn make_generic_glue(@crate_ctxt cx, @ty.t t, str name,
auto re; auto re;
if (!ty.type_is_scalar(t)) { if (!ty.type_is_scalar(t)) {
auto llty; 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)); llty = T_ptr(type_of(cx, t));
} else { } else {
llty = type_of(cx, t); llty = type_of(cx, t);