Skip to content

Commit

Permalink
silence a warning about PhantomData in repr(C) structs
Browse files Browse the repository at this point in the history
Since PhantomData is a ZST, it wasn't considered safe to use in a
repr(C) struct. In practice, however, since the C side doesn't care
about the PhantomData, it's fine. Also this particular case no longer
causes the warning on nightlies:
rust-lang/rust-bindgen#442
  • Loading branch information
db48x committed May 26, 2018
1 parent 4e77fe4 commit 809f82c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rust_src/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#![allow(non_snake_case)]
#![allow(private_no_mangle_fns)]
#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)]
#![allow(improper_ctypes)] // we need this to be able to inclde FieldOffsets in C structs
#![feature(proc_macro)]
#![cfg_attr(feature = "strict", deny(warnings))]
#![feature(global_allocator)]
Expand Down

0 comments on commit 809f82c

Please sign in to comment.