Skip to content

Commit

Permalink
Make type_is_pod handle structs correctly. Closes rust-lang#6868.
Browse files Browse the repository at this point in the history
  • Loading branch information
msullivan committed Jun 4, 2013
1 parent 13aa188 commit d85938f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

1 comment on commit d85938f

@pcwalton
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.