Skip to content

Commit

Permalink
Make type_is_pod handle structs correctly. Closes #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

5 comments on commit d85938f

@bors
Copy link
Contributor

@bors bors commented on d85938f Jun 4, 2013

Choose a reason for hiding this comment

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

saw approval from pcwalton
at msullivan@d85938f

@bors
Copy link
Contributor

@bors bors commented on d85938f Jun 4, 2013

Choose a reason for hiding this comment

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

merging msullivan/rust/incoming = d85938f into auto

@bors
Copy link
Contributor

@bors bors commented on d85938f Jun 4, 2013

Choose a reason for hiding this comment

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

msullivan/rust/incoming = d85938f merged ok, testing candidate = af418f2

@bors
Copy link
Contributor

@bors bors commented on d85938f Jun 4, 2013

Choose a reason for hiding this comment

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

@bors
Copy link
Contributor

@bors bors commented on d85938f Jun 4, 2013

Choose a reason for hiding this comment

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

fast-forwarding incoming to auto = af418f2

Please sign in to comment.