cbindgen icon indicating copy to clipboard operation
cbindgen copied to clipboard

derive-{eq,neq} doesn't account for #[cfg()]d fields.

Open emilio opened this issue 1 year ago • 0 comments

/// The object allocated by an Arc<T>
#[repr(C)]
struct ArcInner<T: ?Sized> {
    count: atomic::AtomicUsize,
    #[cfg(feature = "track_alloc_size")]
    alloc_size: usize,
    data: T,
}

The derived eq/neq implementations still use alloc_size, without the necessary ifdef.

emilio avatar Apr 05 '24 09:04 emilio