Files
cbindgen/tests/rust/bitfield/src/lib.rs
T
2020-10-31 17:05:49 +01:00

16 lines
309 B
Rust

#[repr(C)]
pub struct HasBitfields {
#[cfg(not(feature = "cbindgen"))]
foo_and_bar: u64,
#[cfg(feature = "cbindgen")]
/// cbindgen:bitfield=8
foo: u64,
#[cfg(feature = "cbindgen")]
/// cbindgen:bitfield=56
bar: u64,
}
#[no_mangle]
pub extern "C" fn root(_: &HasBitfields) {}