I am using blocklist_file to control which items go into which generated binding files, and I manually add the imports so everything compiles fine.
The issue is that when a struct references another type that has been blocklisted it doesn't add a #[derive(Copy)] to that type.
An example:
// This works fine:
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct xcb_input_device_key_state_notify_event_t {
pub response_type: u8,
pub device_id: u8,
pub sequence: u16,
pub keys: [u8; 28usize],
}
// This doesn't:
#[repr(C)]
pub struct xcb_input_change_device_notify_event_t {
pub response_type: u8,
pub device_id: u8,
pub sequence: u16,
pub time: xcb_timestamp_t, // this is a type alias to u32 which is defined in a header that has been block-listed while generating the bindings for that file
pub request: u8,
pub pad0: [u8; 23usize],
}
Is this intended behavior? Is there a workaround?
I am using
blocklist_fileto control which items go into which generated binding files, and I manually add the imports so everything compiles fine.The issue is that when a struct references another type that has been blocklisted it doesn't add a
#[derive(Copy)]to that type.An example:
Is this intended behavior? Is there a workaround?