Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emilio opened this issue Apr 5, 2024 · 0 comments
Open

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

emilio opened this issue Apr 5, 2024 · 0 comments
Labels

Comments

@emilio
Copy link
Collaborator

emilio commented Apr 5, 2024

/// 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant