Make type_is_pod handle structs correctly. Closes #6868.

This commit is contained in:
Michael Sullivan 2013-06-03 16:55:05 -07:00
parent 13aa18891c
commit d85938f7c8
1 changed files with 1 additions and 1 deletions

View File

@ -2518,7 +2518,7 @@ pub fn type_is_pod(cx: ctxt, ty: t) -> bool {
ty_param(_) => result = false,
ty_opaque_closure_ptr(_) => result = true,
ty_struct(did, ref substs) => {
result = vec::any(lookup_struct_fields(cx, did), |f| {
result = vec::all(lookup_struct_fields(cx, did), |f| {
let fty = ty::lookup_item_type(cx, f.id);
let sty = subst(cx, substs, fty.ty);
type_is_pod(cx, sty)