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.