mozilla / cbindgen

A project for generating C bindings from Rust code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

emilio opened this issue · 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.