Skip to content

Commit

Permalink
Merge pull request #27 from gnzlbg/fix_bug
Browse files Browse the repository at this point in the history
panic! on non-repr(C) structs only if the struct should not be skipped
  • Loading branch information
alexcrichton committed Feb 3, 2018
2 parents 3a2e87e + c79cfd9 commit d3a5248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ impl<'a, 'v> Visitor<'v> for Generator<'a> {
*a == ReprAttr::ReprExtern
})
});
if !is_c {
if !is_c && !(self.opts.skip_struct)(&i.ident.to_string()) {
panic!("{} is not marked #[repr(C)]", i.ident);
}
self.test_struct(&i.ident.to_string(), s);
Expand Down

0 comments on commit d3a5248

Please sign in to comment.