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

Clean up atomics support #1592

Open
joshlf opened this issue Aug 17, 2024 · 0 comments
Open

Clean up atomics support #1592

joshlf opened this issue Aug 17, 2024 · 0 comments

Comments

@joshlf
Copy link
Member

joshlf commented Aug 17, 2024

#1586 gates impls of zerocopy traits for atomic types on target_has_atomic = "xxx", ensuring that we don't emit invalid impls. On its own, that PR is correct, but attempts to be minimal in order to make quick progress and to avoid lumping a large refactor into what would otherwise be a small PR.

Separately, we should follow up and clean up atomics support in general:

  • Consider co-locating the definition of unsafe_impl_transparent_wrapper_for_atomic! (in util in #1586) with its uses (in impls in #1586). Note that we may also want to avoid doing that since reasoning about the soundness of the body of that macro requires understanding the semantics of TransparentWrapper, so having it next to the definition of TransparentWrapper might be good.
  • Consider indirecting via an Atomic trait as prototyped in Gate implementations for Atomic* types behind #[cfg(target_has_atomic)] and Rust 1.60 #1091
  • Consider adopting any other ideas from #1091 which weren't already carved out into separate PRs (#1585 and #1585)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant